Prechádzať zdrojové kódy

fix 并发出金失败的bug

DevYK 3 rokov pred
rodič
commit
34823a9a6c
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      routes/sdk.js

+ 4 - 1
routes/sdk.js

@@ -128,7 +128,6 @@ async function withdraw_task() {
         if (utils.getTimestamp() - last_time < 60000) {
             //有可能上一个区块还未更新,这里做一个尝试限制
             //Error: Failed to make "eth_sendRawTransaction" request with networkConnector: "already known"
-            logger.error('sleep5s', last_receiver);
             //通过 交易 hash 获取块。last_hash
             if (last_hash) {
                 var options = {
@@ -193,6 +192,10 @@ async function withdraw_task() {
                 await withdraw_db.update_withdraw_task(exec_obj.withdraw_id, update_obj)
             }
         } catch (error) {
+            var update_obj = {}
+            update_obj.withdraw_status = 3
+            update_obj.errorMsg = error.toString()
+            await withdraw_db.update_withdraw_task(exec_obj.withdraw_id, update_obj)
             logger.error('withdraw_task error=', error)
         }
     }