diff options
author | Felix Lange <fjl@twurst.com> | 2015-08-25 21:49:36 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-08-25 21:54:57 +0800 |
commit | fd512fa12c59657d9e47cc3411e6e24bd1af89cb (patch) | |
tree | 16ddada3b6ecbf26e53bb9eaf0c8b03812f7cab8 /tests/block_test_util.go | |
parent | dc3fb69dce674069479313837a5612045303c418 (diff) | |
download | go-tangerine-1.1.0.tar go-tangerine-1.1.0.tar.gz go-tangerine-1.1.0.tar.bz2 go-tangerine-1.1.0.tar.lz go-tangerine-1.1.0.tar.xz go-tangerine-1.1.0.tar.zst go-tangerine-1.1.0.zip |
Merge pull request #1711 from Gustav-Simonsson/timestamp_big_intv1.1.0
Add tests for uncle timestamps and refactor timestamp type
(cherry picked from commit abce09954b6901b446c004ee06b389c338922f28)
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 |