aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test_util.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-11-13 19:47:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-03 20:45:35 +0800
commit6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (patch)
treec92974f8b82209073ad1ee3faec6e149f834bf69 /tests/state_test_util.go
parentb8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff)
downloaddexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.gz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.zst
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.zip
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r--tests/state_test_util.go8
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
}