eth, tests: fix test

This commit is contained in:
healthykim 2026-06-16 16:12:36 +02:00
parent 6ce938c2a4
commit cc0112aee0
2 changed files with 14 additions and 13 deletions

View file

@ -93,11 +93,11 @@ type txFetcherTest struct {
// newTestBlobBuffer returns a BlobBuffer with no-op callbacks for tests that
// don't exercise blob handling but still need a non-nil buffer.
func newTestBlobBuffer() *blobpool.BlobBuffer {
return blobpool.NewBlobBuffer(
func(*types.Transaction) error { return nil },
func(*blobpool.BlobTxForPool) error { return nil },
func(string) {},
)
return blobpool.NewBlobBuffer(blobpool.BlobBufferFunctions{
ValidateTx: func(*types.Transaction) error { return nil },
AddToPool: func(*blobpool.BlobTxForPool) error { return nil },
DropPeer: func(string) {},
})
}
// newTestTxFetcher creates a tx fetcher with noop callbacks, simulated clock,

View file

@ -32,9 +32,9 @@ import (
)
var (
peers []string
peerVersions map[string]uint
txs []*types.Transaction
peers []string
peerVersions map[string]uint
txs []*types.Transaction
)
func init() {
@ -91,11 +91,12 @@ func fuzz(input []byte) int {
},
func(string, []common.Hash) error { return nil },
nil,
blobpool.NewBlobBuffer(
func(*types.Transaction) error { return nil },
func(*blobpool.BlobTxForPool) error { return nil },
func(string) {},
),
blobpool.NewBlobBuffer(blobpool.BlobBufferFunctions{
ValidateTx: func(*types.Transaction) error { return nil },
AddToPool: func(*blobpool.BlobTxForPool) error { return nil },
DropPeer: func(string) {},
}),
clock,
func() time.Time {
nanoTime := int64(clock.Now())