diff options
Diffstat (limited to 'core/bench_test.go')
-rw-r--r-- | core/bench_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/bench_test.go b/core/bench_test.go index 353d217fd..59b5ad758 100644 --- a/core/bench_test.go +++ b/core/bench_test.go @@ -92,6 +92,7 @@ func genValueTx(nbytes int) func(int, *BlockGen) { var ( ringKeys = make([]*ecdsa.PrivateKey, 1000) ringAddrs = make([]common.Address, len(ringKeys)) + bigTxGas = new(big.Int).SetUint64(params.TxGas) ) func init() { @@ -111,8 +112,8 @@ func genTxRing(naccounts int) func(int, *BlockGen) { return func(i int, gen *BlockGen) { gas := CalcGasLimit(gen.PrevBlock(i - 1)) for { - gas.Sub(gas, params.TxGas) - if gas.Cmp(params.TxGas) < 0 { + gas.Sub(gas, bigTxGas) + if gas.Cmp(bigTxGas) < 0 { break } to := (from + 1) % naccounts @@ -120,7 +121,7 @@ func genTxRing(naccounts int) func(int, *BlockGen) { gen.TxNonce(ringAddrs[from]), ringAddrs[to], benchRootFunds, - params.TxGas, + bigTxGas, nil, nil, ) |