eth/filters, p2p/simulations: fix benchmarks (#23806)
Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present. Another one was rejected because the receipt was lacking a backing transcation. The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(), and there is no need to call both Stop and Close on it.
This commit is contained in:
committed by
GitHub
parent
32150f8aa9
commit
31870a59ff
@ -337,6 +337,7 @@ func BenchmarkTransactionTrace(b *testing.B) {
|
||||
Time: new(big.Int).SetUint64(uint64(5)),
|
||||
Difficulty: big.NewInt(0xffffffff),
|
||||
GasLimit: gas,
|
||||
BaseFee: big.NewInt(8),
|
||||
}
|
||||
alloc := core.GenesisAlloc{}
|
||||
// The code pushes 'deadbeef' into memory, then the other params, and calls CREATE2, then returns
|
||||
|
Reference in New Issue
Block a user