core: fix benchmark tests (#23803)

Fixes crashes in various benchmarks in the core package
This commit is contained in:
Martin Holst Swende
2021-10-27 13:08:51 +02:00
committed by GitHub
parent 526c3f6b9e
commit eab4d898fd
4 changed files with 51 additions and 20 deletions

View File

@ -2385,7 +2385,7 @@ func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks in
for txi := 0; txi < numTxs; txi++ {
uniq := uint64(i*numTxs + txi)
recipient := recipientFn(uniq)
tx, err := types.SignTx(types.NewTransaction(uniq, recipient, big.NewInt(1), params.TxGas, big.NewInt(1), nil), signer, testBankKey)
tx, err := types.SignTx(types.NewTransaction(uniq, recipient, big.NewInt(1), params.TxGas, block.header.BaseFee, nil), signer, testBankKey)
if err != nil {
b.Error(err)
}