core/txpool/blobpool: fix test

This commit is contained in:
Gary Rong 2025-09-18 21:28:22 +08:00
parent 0ce7e11529
commit d54a983742

View file

@ -1752,8 +1752,8 @@ func TestAdd(t *testing.T) {
// Add each transaction one by one, verifying the pool internals in between // Add each transaction one by one, verifying the pool internals in between
for j, add := range tt.adds { for j, add := range tt.adds {
signed, _ := types.SignNewTx(keys[add.from], types.LatestSigner(params.MainnetChainConfig), add.tx) signed, _ := types.SignNewTx(keys[add.from], types.LatestSigner(params.MainnetChainConfig), add.tx)
if err := pool.add(signed); !errors.Is(err, add.err) { if errs := pool.Add([]*types.Transaction{signed}, true); !errors.Is(errs[0], add.err) {
t.Errorf("test %d, tx %d: adding transaction error mismatch: have %v, want %v", i, j, err, add.err) t.Errorf("test %d, tx %d: adding transaction error mismatch: have %v, want %v", i, j, errs[0], add.err)
} }
if add.err == nil { if add.err == nil {
size, exist := pool.lookup.sizeOfTx(signed.Hash()) size, exist := pool.lookup.sizeOfTx(signed.Hash())