diff options
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r-- | tests/block_test_util.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go index a789e6d88..e2d1a0b43 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -77,8 +77,8 @@ type btHeader struct { UncleHash common.Hash ExtraData []byte Difficulty *big.Int - GasLimit *big.Int - GasUsed *big.Int + GasLimit uint64 + GasUsed uint64 Timestamp *big.Int } @@ -86,8 +86,8 @@ type btHeaderMarshaling struct { ExtraData hexutil.Bytes Number *math.HexOrDecimal256 Difficulty *math.HexOrDecimal256 - GasLimit *math.HexOrDecimal256 - GasUsed *math.HexOrDecimal256 + GasLimit *math.HexOrDecimal64 + GasUsed *math.HexOrDecimal64 Timestamp *math.HexOrDecimal256 } @@ -141,8 +141,8 @@ func (t *BlockTest) genesis(config *params.ChainConfig) *core.Genesis { Timestamp: t.json.Genesis.Timestamp.Uint64(), ParentHash: t.json.Genesis.ParentHash, ExtraData: t.json.Genesis.ExtraData, - GasLimit: t.json.Genesis.GasLimit.Uint64(), - GasUsed: t.json.Genesis.GasUsed.Uint64(), + GasLimit: t.json.Genesis.GasLimit, + GasUsed: t.json.Genesis.GasUsed, Difficulty: t.json.Genesis.Difficulty, Mixhash: t.json.Genesis.MixHash, Coinbase: t.json.Genesis.Coinbase, @@ -234,11 +234,11 @@ func validateHeader(h *btHeader, h2 *types.Header) error { if h.Difficulty.Cmp(h2.Difficulty) != 0 { return fmt.Errorf("Difficulty: want: %v have: %v", h.Difficulty, h2.Difficulty) } - if h.GasLimit.Cmp(h2.GasLimit) != 0 { - return fmt.Errorf("GasLimit: want: %v have: %v", h.GasLimit, h2.GasLimit) + if h.GasLimit != h2.GasLimit { + return fmt.Errorf("GasLimit: want: %d have: %d", h.GasLimit, h2.GasLimit) } - if h.GasUsed.Cmp(h2.GasUsed) != 0 { - return fmt.Errorf("GasUsed: want: %v have: %v", h.GasUsed, h2.GasUsed) + if h.GasUsed != h2.GasUsed { + return fmt.Errorf("GasUsed: want: %d have: %d", h.GasUsed, h2.GasUsed) } if h.Timestamp.Cmp(h2.Time) != 0 { return fmt.Errorf("Timestamp: want: %v have: %v", h.Timestamp, h2.Time) |