Skip to content

Commit 416c730

Browse files
committed
fix: fix test error
1 parent 262f231 commit 416c730

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/txpool/blobpool/blobpool_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,15 +1649,15 @@ func TestAdd(t *testing.T) {
16491649
signed, _ := types.SignNewTx(keys[add.from], types.LatestSigner(params.MainnetChainConfig), add.tx)
16501650
sidecar, _ := signed.BlobTxSidecar().ToBlobTxCellSidecar()
16511651

1652-
if err := pool.add(signed.WithoutBlobTxSidecar(), sidecar); !errors.Is(err, add.err) {
1652+
if err := pool.add(signed.WithoutBlobTxSidecar(), sidecar, signed.Size()); !errors.Is(err, add.err) {
16531653
t.Errorf("test %d, tx %d: adding transaction error mismatch: have %v, want %v", i, j, err, add.err)
16541654
}
16551655
if add.err == nil {
16561656
size, exist := pool.lookup.sizeOfTx(signed.Hash())
16571657
if !exist {
16581658
t.Errorf("test %d, tx %d: failed to lookup transaction's size", i, j)
16591659
}
1660-
if size != signed.WithoutBlobTxSidecar().Size() {
1660+
if size != signed.Size() {
16611661
t.Errorf("test %d, tx %d: transaction's size mismatches: have %v, want %v",
16621662
i, j, size, signed.Size())
16631663
}
@@ -2023,7 +2023,7 @@ func benchmarkPoolPending(b *testing.B, datacap uint64) {
20232023
}
20242024
statedb.AddBalance(addr, uint256.NewInt(1_000_000_000), tracing.BalanceChangeUnspecified)
20252025
sidecar, _ := tx.BlobTxSidecar().ToBlobTxCellSidecar()
2026-
pool.add(tx.WithoutBlobTxSidecar(), sidecar)
2026+
pool.add(tx.WithoutBlobTxSidecar(), sidecar, tx.Size())
20272027
}
20282028
statedb.Commit(0, true, false)
20292029
defer pool.Close()

0 commit comments

Comments
 (0)