diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-11-13 19:47:27 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-03 20:45:35 +0800 |
commit | 6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (patch) | |
tree | c92974f8b82209073ad1ee3faec6e149f834bf69 /tests/gen_btheader.go | |
parent | b8caba97099ee5eed33c3b80dd4ea540722e7d8f (diff) | |
download | dexon-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_btheader.go')
-rw-r--r-- | tests/gen_btheader.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/gen_btheader.go b/tests/gen_btheader.go index 5d65e0dbc..1be659ecb 100644 --- a/tests/gen_btheader.go +++ b/tests/gen_btheader.go @@ -29,8 +29,8 @@ func (b btHeader) MarshalJSON() ([]byte, error) { UncleHash common.Hash ExtraData hexutil.Bytes Difficulty *math.HexOrDecimal256 - GasLimit *math.HexOrDecimal256 - GasUsed *math.HexOrDecimal256 + GasLimit math.HexOrDecimal64 + GasUsed math.HexOrDecimal64 Timestamp *math.HexOrDecimal256 } var enc btHeader @@ -47,8 +47,8 @@ func (b btHeader) MarshalJSON() ([]byte, error) { enc.UncleHash = b.UncleHash enc.ExtraData = b.ExtraData enc.Difficulty = (*math.HexOrDecimal256)(b.Difficulty) - enc.GasLimit = (*math.HexOrDecimal256)(b.GasLimit) - enc.GasUsed = (*math.HexOrDecimal256)(b.GasUsed) + enc.GasLimit = (math.HexOrDecimal64)(b.GasLimit) + enc.GasUsed = (math.HexOrDecimal64)(b.GasUsed) enc.Timestamp = (*math.HexOrDecimal256)(b.Timestamp) return json.Marshal(&enc) } @@ -68,8 +68,8 @@ func (b *btHeader) UnmarshalJSON(input []byte) error { UncleHash *common.Hash ExtraData hexutil.Bytes Difficulty *math.HexOrDecimal256 - GasLimit *math.HexOrDecimal256 - GasUsed *math.HexOrDecimal256 + GasLimit *math.HexOrDecimal64 + GasUsed *math.HexOrDecimal64 Timestamp *math.HexOrDecimal256 } var dec btHeader @@ -116,10 +116,10 @@ func (b *btHeader) UnmarshalJSON(input []byte) error { b.Difficulty = (*big.Int)(dec.Difficulty) } if dec.GasLimit != nil { - b.GasLimit = (*big.Int)(dec.GasLimit) + b.GasLimit = uint64(*dec.GasLimit) } if dec.GasUsed != nil { - b.GasUsed = (*big.Int)(dec.GasUsed) + b.GasUsed = uint64(*dec.GasUsed) } if dec.Timestamp != nil { b.Timestamp = (*big.Int)(dec.Timestamp) |