aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gen_stenv.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/gen_stenv.go
parentb8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff)
downloaddexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.gz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.bz2
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.lz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.xz
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.tar.zst
dexon-6f69cdd109b1dd692b8dfb15e7c53d2051fbc946.zip
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'tests/gen_stenv.go')
-rw-r--r--tests/gen_stenv.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gen_stenv.go b/tests/gen_stenv.go
index c780524bc..1d4baf2fd 100644
--- a/tests/gen_stenv.go
+++ b/tests/gen_stenv.go
@@ -17,14 +17,14 @@ func (s stEnv) MarshalJSON() ([]byte, error) {
type stEnv struct {
Coinbase common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"`
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"`
- GasLimit *math.HexOrDecimal256 `json:"currentGasLimit" gencodec:"required"`
+ GasLimit math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"`
Number math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"`
Timestamp math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"`
}
var enc stEnv
enc.Coinbase = common.UnprefixedAddress(s.Coinbase)
enc.Difficulty = (*math.HexOrDecimal256)(s.Difficulty)
- enc.GasLimit = (*math.HexOrDecimal256)(s.GasLimit)
+ enc.GasLimit = math.HexOrDecimal64(s.GasLimit)
enc.Number = math.HexOrDecimal64(s.Number)
enc.Timestamp = math.HexOrDecimal64(s.Timestamp)
return json.Marshal(&enc)
@@ -34,7 +34,7 @@ func (s *stEnv) UnmarshalJSON(input []byte) error {
type stEnv struct {
Coinbase *common.UnprefixedAddress `json:"currentCoinbase" gencodec:"required"`
Difficulty *math.HexOrDecimal256 `json:"currentDifficulty" gencodec:"required"`
- GasLimit *math.HexOrDecimal256 `json:"currentGasLimit" gencodec:"required"`
+ GasLimit *math.HexOrDecimal64 `json:"currentGasLimit" gencodec:"required"`
Number *math.HexOrDecimal64 `json:"currentNumber" gencodec:"required"`
Timestamp *math.HexOrDecimal64 `json:"currentTimestamp" gencodec:"required"`
}
@@ -53,7 +53,7 @@ func (s *stEnv) UnmarshalJSON(input []byte) error {
if dec.GasLimit == nil {
return errors.New("missing required field 'currentGasLimit' for stEnv")
}
- s.GasLimit = (*big.Int)(dec.GasLimit)
+ s.GasLimit = uint64(*dec.GasLimit)
if dec.Number == nil {
return errors.New("missing required field 'currentNumber' for stEnv")
}