|
|
|
@ -2535,7 +2535,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, dataFn func(uint64) []byte) { |
|
|
|
|
func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks int, recipientFn func(uint64) common.Address) { |
|
|
|
|
var ( |
|
|
|
|
signer = types.HomesteadSigner{} |
|
|
|
|
testBankKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") |
|
|
|
@ -2598,10 +2598,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToNonexisting(b *testing.B) { |
|
|
|
|
recipientFn := func(nonce uint64) common.Address { |
|
|
|
|
return common.BigToAddress(new(big.Int).SetUint64(1337 + nonce)) |
|
|
|
|
} |
|
|
|
|
dataFn := func(nonce uint64) []byte { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) { |
|
|
|
@ -2615,10 +2612,7 @@ func BenchmarkBlockChain_1x1000ValueTransferToExisting(b *testing.B) { |
|
|
|
|
recipientFn := func(nonce uint64) common.Address { |
|
|
|
|
return common.BigToAddress(new(big.Int).SetUint64(1337)) |
|
|
|
|
} |
|
|
|
|
dataFn := func(nonce uint64) []byte { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func BenchmarkBlockChain_1x1000Executions(b *testing.B) { |
|
|
|
@ -2632,10 +2626,7 @@ func BenchmarkBlockChain_1x1000Executions(b *testing.B) { |
|
|
|
|
recipientFn := func(nonce uint64) common.Address { |
|
|
|
|
return common.BigToAddress(new(big.Int).SetUint64(0xc0de)) |
|
|
|
|
} |
|
|
|
|
dataFn := func(nonce uint64) []byte { |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn, dataFn) |
|
|
|
|
benchmarkLargeNumberOfValueToNonexisting(b, numTxs, numBlocks, recipientFn) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Tests that importing a some old blocks, where all blocks are before the
|
|
|
|
|