瀏覽代碼

gas費識別錯誤

skyfffire 5 月之前
父節點
當前提交
18cdab2294
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      as.py

+ 13 - 0
as.py

@@ -309,6 +309,19 @@ def update_tx_data():
                         time.sleep(1)
 
                         continue
+                    
+                    # 有時候不會馬上識別出gas信息之類的
+                    fileds = ['gasLimit', 'gasPrice', 'gasUsed', 'height', 'status']
+                    insufficient = False
+                    for filed in fileds:
+                        if details[filed] == '':
+                            insufficient = True
+                            break
+                    if insufficient:
+                        # 每一個之間等待1s
+                        time.sleep(1)
+
+                        continue
 
                     # 成功獲取之後直接調用更新
                     with pending_lock: