mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
eth, tests: fix test
This commit is contained in:
parent
6ce938c2a4
commit
cc0112aee0
2 changed files with 14 additions and 13 deletions
|
|
@ -93,11 +93,11 @@ type txFetcherTest struct {
|
||||||
// newTestBlobBuffer returns a BlobBuffer with no-op callbacks for tests that
|
// newTestBlobBuffer returns a BlobBuffer with no-op callbacks for tests that
|
||||||
// don't exercise blob handling but still need a non-nil buffer.
|
// don't exercise blob handling but still need a non-nil buffer.
|
||||||
func newTestBlobBuffer() *blobpool.BlobBuffer {
|
func newTestBlobBuffer() *blobpool.BlobBuffer {
|
||||||
return blobpool.NewBlobBuffer(
|
return blobpool.NewBlobBuffer(blobpool.BlobBufferFunctions{
|
||||||
func(*types.Transaction) error { return nil },
|
ValidateTx: func(*types.Transaction) error { return nil },
|
||||||
func(*blobpool.BlobTxForPool) error { return nil },
|
AddToPool: func(*blobpool.BlobTxForPool) error { return nil },
|
||||||
func(string) {},
|
DropPeer: func(string) {},
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// newTestTxFetcher creates a tx fetcher with noop callbacks, simulated clock,
|
// newTestTxFetcher creates a tx fetcher with noop callbacks, simulated clock,
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
peers []string
|
peers []string
|
||||||
peerVersions map[string]uint
|
peerVersions map[string]uint
|
||||||
txs []*types.Transaction
|
txs []*types.Transaction
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
@ -91,11 +91,12 @@ func fuzz(input []byte) int {
|
||||||
},
|
},
|
||||||
func(string, []common.Hash) error { return nil },
|
func(string, []common.Hash) error { return nil },
|
||||||
nil,
|
nil,
|
||||||
blobpool.NewBlobBuffer(
|
|
||||||
func(*types.Transaction) error { return nil },
|
blobpool.NewBlobBuffer(blobpool.BlobBufferFunctions{
|
||||||
func(*blobpool.BlobTxForPool) error { return nil },
|
ValidateTx: func(*types.Transaction) error { return nil },
|
||||||
func(string) {},
|
AddToPool: func(*blobpool.BlobTxForPool) error { return nil },
|
||||||
),
|
DropPeer: func(string) {},
|
||||||
|
}),
|
||||||
clock,
|
clock,
|
||||||
func() time.Time {
|
func() time.Time {
|
||||||
nanoTime := int64(clock.Now())
|
nanoTime := int64(clock.Now())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue