diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-01-03 22:53:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 22:53:06 +0800 |
commit | 762f3a48a00da02fe58063cb6ce8dc2d08821f15 (patch) | |
tree | 783421f8ece4306f69cb17e515ee07c1ab4fe0eb /tests/state_test_util.go | |
parent | b47285f1cf0cb475f29322ceb9fac4d7e1cfb11f (diff) | |
parent | 6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (diff) | |
download | dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.gz dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.bz2 dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.lz dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.xz dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.zst dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.zip |
Merge pull request #15466 from karalabe/uint64-gas-limit
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r-- | tests/state_test_util.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 1f4fb2bd5..78c05b024 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -76,7 +76,7 @@ type stPostState struct { type stEnv struct { Coinbase common.Address `json:"currentCoinbase" gencodec:"required"` Difficulty *big.Int `json:"currentDifficulty" gencodec:"required"` - GasLimit *big.Int `json:"currentGasLimit" gencodec:"required"` + GasLimit uint64 `json:"currentGasLimit" gencodec:"required"` Number uint64 `json:"currentNumber" gencodec:"required"` Timestamp uint64 `json:"currentTimestamp" gencodec:"required"` } @@ -84,7 +84,7 @@ type stEnv struct { type stEnvMarshaling struct { Coinbase common.UnprefixedAddress Difficulty *math.HexOrDecimal256 - GasLimit *math.HexOrDecimal256 + GasLimit math.HexOrDecimal64 Number math.HexOrDecimal64 Timestamp math.HexOrDecimal64 } @@ -180,7 +180,7 @@ func (t *StateTest) genesis(config *params.ChainConfig) *core.Genesis { Config: config, Coinbase: t.json.Env.Coinbase, Difficulty: t.json.Env.Difficulty, - GasLimit: t.json.Env.GasLimit.Uint64(), + GasLimit: t.json.Env.GasLimit, Number: t.json.Env.Number, Timestamp: t.json.Env.Timestamp, Alloc: t.json.Pre, @@ -233,7 +233,7 @@ func (tx *stTransaction) toMessage(ps stPostState) (core.Message, error) { return nil, fmt.Errorf("invalid tx data %q", dataHex) } - msg := types.NewMessage(from, to, tx.Nonce, value, new(big.Int).SetUint64(gasLimit), tx.GasPrice, data, true) + msg := types.NewMessage(from, to, tx.Nonce, value, gasLimit, tx.GasPrice, data, true) return msg, nil } |