mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
tests: remove unused parameters
This commit is contained in:
parent
c11aac249d
commit
f37fd255e1
1 changed files with 6 additions and 15 deletions
|
|
@ -2239,7 +2239,7 @@ func testInsertKnownChainData(t *testing.T, typ string, scheme string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
inserter = func(blocks []*types.Block, receipts []types.Receipts) error {
|
inserter = func(blocks []*types.Block, _ []types.Receipts) error {
|
||||||
_, err := chain.InsertChain(blocks)
|
_, err := chain.InsertChain(blocks)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -2413,7 +2413,7 @@ func testInsertKnownChainDataWithMerging(t *testing.T, typ string, mergeHeight i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
inserter = func(blocks []*types.Block, receipts []types.Receipts) error {
|
inserter = func(blocks []*types.Block, _ []types.Receipts) error {
|
||||||
i, err := chain.InsertChain(blocks)
|
i, err := chain.InsertChain(blocks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("index %d: %w", i, err)
|
return fmt.Errorf("index %d: %w", i, err)
|
||||||
|
|
@ -2618,7 +2618,7 @@ func testReorgToShorterRemovesCanonMappingHeaderChain(t *testing.T, scheme strin
|
||||||
}
|
}
|
||||||
|
|
||||||
// Benchmarks large blocks with value transfers to non-existing accounts
|
// Benchmarks large blocks with value transfers to non-existing accounts
|
||||||
func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address, dataFn func(uint64) []byte) {
|
func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address) {
|
||||||
var (
|
var (
|
||||||
signer = types.HomesteadSigner{}
|
signer = types.HomesteadSigner{}
|
||||||
testBankKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
testBankKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
|
||||||
|
|
@ -2681,10 +2681,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToNonexisting(b *testing.B) {
|
||||||
recipientFn := func(nonce uint64) common.Address {
|
recipientFn := func(nonce uint64) common.Address {
|
||||||
return common.BigToAddress(new(big.Int).SetUint64(1337 + nonce))
|
return common.BigToAddress(new(big.Int).SetUint64(1337 + nonce))
|
||||||
}
|
}
|
||||||
dataFn := func(nonce uint64) []byte {
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
|
||||||
return nil
|
|
||||||
}
|
|
||||||
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) {
|
func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) {
|
||||||
|
|
@ -2698,10 +2695,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) {
|
||||||
recipientFn := func(nonce uint64) common.Address {
|
recipientFn := func(nonce uint64) common.Address {
|
||||||
return common.BigToAddress(new(big.Int).SetUint64(1337))
|
return common.BigToAddress(new(big.Int).SetUint64(1337))
|
||||||
}
|
}
|
||||||
dataFn := func(nonce uint64) []byte {
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
|
||||||
return nil
|
|
||||||
}
|
|
||||||
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func BenchmarkBlockChain_1x1000Executions(b *testing.B) {
|
func BenchmarkBlockChain_1x1000Executions(b *testing.B) {
|
||||||
|
|
@ -2715,10 +2709,7 @@ func BenchmarkBlockChain_1x1000Executions(b *testing.B) {
|
||||||
recipientFn := func(nonce uint64) common.Address {
|
recipientFn := func(nonce uint64) common.Address {
|
||||||
return common.BigToAddress(new(big.Int).SetUint64(0xc0de))
|
return common.BigToAddress(new(big.Int).SetUint64(0xc0de))
|
||||||
}
|
}
|
||||||
dataFn := func(nonce uint64) []byte {
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn)
|
||||||
return nil
|
|
||||||
}
|
|
||||||
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests that importing a some old blocks, where all blocks are before the
|
// Tests that importing a some old blocks, where all blocks are before the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue