Forráskód Böngészése

ignore empty tx in GetDiffAccountsWithScope

Signed-off-by: Keefe-Liu <bianze.kernel@gmail.com>
Keefe-Liu 4 éve
szülő
commit
0315f60924
1 módosított fájl, 4 hozzáadás és 1 törlés
  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)
+			}
 		}
 	}