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/gen_stenv.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/gen_stenv.go')
-rw-r--r-- | tests/gen_stenv.go | 8 |
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") } |