瀏覽代碼

fix 并发出金失败的bug

DevYK 2 年之前
父節點
當前提交
34823a9a6c
共有 1 個文件被更改,包括 4 次插入1 次删除
  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)
         }
     }