瀏覽代碼

Merge pull request #442 from KeefeL/diff_accouts

ignore empty tx in GetDiffAccountsWithScope
KeefeL 4 年之前
父節點
當前提交
59d3b537a5
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      internal/ethapi/api.go

+ 4 - 1
internal/ethapi/api.go

@@ -1185,7 +1185,10 @@ func (s *PublicBlockChainAPI) GetDiffAccountsWithScope(ctx context.Context, bloc
 					delete(diffTx.Accounts, account)
 				}
 			}
-			result.Transactions = append(result.Transactions, diffTx)
+
+			if len(diffTx.Accounts) != 0 {
+				result.Transactions = append(result.Transactions, diffTx)
+			}
 		}
 	}