diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 891a2cb477..876d662f74 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -2345,7 +2345,7 @@ func testInsertKnownChainData(t *testing.T, typ string, scheme string) { } } } else { - inserter = func(blocks []*types.Block, _ []types.Receipts) error { + inserter = func(blocks []*types.Block, receipts []types.Receipts) error { _, err := chain.InsertChain(blocks) return err } @@ -2519,7 +2519,7 @@ func testInsertKnownChainDataWithMerging(t *testing.T, typ string, mergeHeight i } } } else { - inserter = func(blocks []*types.Block, _ []types.Receipts) error { + inserter = func(blocks []*types.Block, receipts []types.Receipts) error { i, err := chain.InsertChain(blocks) if err != nil { return fmt.Errorf("index %d: %w", i, err) @@ -2724,7 +2724,7 @@ func testReorgToShorterRemovesCanonMappingHeaderChain(t *testing.T, scheme strin } // Benchmarks large blocks with value transfers to non-existing accounts -func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address) { +func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address, dataFn func(uint64) []byte) { var ( signer = types.HomesteadSigner{} testBankKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") @@ -2787,7 +2787,10 @@ func BenchmarkBlockChain_1x1000ValueTransferToNonexisting(b *testing.B) { recipientFn := func(nonce uint64) common.Address { return common.BigToAddress(new(big.Int).SetUint64(1337 + nonce)) } - benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) + dataFn := func(nonce uint64) []byte { + return nil + } + benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) } func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) { @@ -2801,7 +2804,10 @@ func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) { recipientFn := func(nonce uint64) common.Address { return common.BigToAddress(new(big.Int).SetUint64(1337)) } - benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) + dataFn := func(nonce uint64) []byte { + return nil + } + benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) } func BenchmarkBlockChain_1x1000Executions(b *testing.B) { @@ -2815,7 +2821,10 @@ func BenchmarkBlockChain_1x1000Executions(b *testing.B) { recipientFn := func(nonce uint64) common.Address { return common.BigToAddress(new(big.Int).SetUint64(0xc0de)) } - benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) + dataFn := func(nonce uint64) []byte { + return nil + } + benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) } // Tests that importing a some old blocks, where all blocks are before the diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 1f2ee7ee53..1d0383daad 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -361,7 +361,7 @@ func allTransactionTypes(addr common.Address, config *params.ChainConfig) []txDa } } -func allBlobTxs(addr common.Address, _ *params.ChainConfig) []txData { +func allBlobTxs(addr common.Address, config *params.ChainConfig) []txData { return []txData{ { Tx: &types.BlobTx{