diff options
author | Felix Lange <fjl@twurst.com> | 2015-08-25 21:49:36 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-08-25 21:49:36 +0800 |
commit | abce09954b6901b446c004ee06b389c338922f28 (patch) | |
tree | 16ddada3b6ecbf26e53bb9eaf0c8b03812f7cab8 /tests/block_test_util.go | |
parent | a219159e7e18ccaa52c9c493a19a11e6b7bab3dd (diff) | |
parent | 7324176f702a77fc331bf16a968d2eb4bccce021 (diff) | |
download | dexon-abce09954b6901b446c004ee06b389c338922f28.tar dexon-abce09954b6901b446c004ee06b389c338922f28.tar.gz dexon-abce09954b6901b446c004ee06b389c338922f28.tar.bz2 dexon-abce09954b6901b446c004ee06b389c338922f28.tar.lz dexon-abce09954b6901b446c004ee06b389c338922f28.tar.xz dexon-abce09954b6901b446c004ee06b389c338922f28.tar.zst dexon-abce09954b6901b446c004ee06b389c338922f28.zip |
Merge pull request #1711 from Gustav-Simonsson/timestamp_big_int
Add tests for uncle timestamps and refactor timestamp type
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r-- | tests/block_test_util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go index d47c2b101..2090afce7 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -365,8 +365,8 @@ func (s *BlockTest) validateBlockHeader(h *btHeader, h2 *types.Header) error { return fmt.Errorf("GasUsed: expected: %v, decoded: %v", expectedGasUsed, h2.GasUsed) } - expectedTimestamp := mustConvertUint(h.Timestamp, 16) - if expectedTimestamp != h2.Time { + expectedTimestamp := mustConvertBigInt(h.Timestamp, 16) + if expectedTimestamp.Cmp(h2.Time) != 0 { return fmt.Errorf("Timestamp: expected: %v, decoded: %v", expectedTimestamp, h2.Time) } @@ -461,7 +461,7 @@ func mustConvertHeader(in btHeader) *types.Header { GasUsed: mustConvertBigInt(in.GasUsed, 16), GasLimit: mustConvertBigInt(in.GasLimit, 16), Difficulty: mustConvertBigInt(in.Difficulty, 16), - Time: mustConvertUint(in.Timestamp, 16), + Time: mustConvertBigInt(in.Timestamp, 16), Nonce: types.EncodeNonce(mustConvertUint(in.Nonce, 16)), } return header |