diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-06-30 15:13:16 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-06-30 16:52:11 +0800 |
commit | 4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d (patch) | |
tree | 4bb5055690cae276a5480572b463cd06fa219f23 /core/types | |
parent | be935bff84d54cd7a7f4074e2326d62f664ba4e3 (diff) | |
download | go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar.gz go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar.bz2 go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar.lz go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar.xz go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.tar.zst go-tangerine-4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d.zip |
Use uint64 for block header timestamp
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/block.go | 2 | ||||
-rw-r--r-- | core/types/block_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/types/block.go b/core/types/block.go index b7eb700ca..e8919e9a0 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -290,7 +290,7 @@ func (b *Block) MixDigest() common.Hash { return b.header.MixDigest } func (b *Block) Nonce() uint64 { return binary.BigEndian.Uint64(b.header.Nonce[:]) } func (b *Block) Bloom() Bloom { return b.header.Bloom } func (b *Block) Coinbase() common.Address { return b.header.Coinbase } -func (b *Block) Time() int64 { return int64(b.header.Time) } +func (b *Block) Time() uint64 { return b.header.Time } func (b *Block) Root() common.Hash { return b.header.Root } func (b *Block) ParentHash() common.Hash { return b.header.ParentHash } func (b *Block) TxHash() common.Hash { return b.header.TxHash } diff --git a/core/types/block_test.go b/core/types/block_test.go index 03e6881be..e0b98cd26 100644 --- a/core/types/block_test.go +++ b/core/types/block_test.go @@ -31,7 +31,7 @@ func TestBlockEncoding(t *testing.T) { check("Root", block.Root(), common.HexToHash("ef1552a40b7165c3cd773806b9e0c165b75356e0314bf0706f279c729f51e017")) check("Hash", block.Hash(), common.HexToHash("0a5843ac1cb04865017cb35a57b50b07084e5fcee39b5acadade33149f4fff9e")) check("Nonce", block.Nonce(), uint64(0xa13a5a8c8f2bb1c4)) - check("Time", block.Time(), int64(1426516743)) + check("Time", block.Time(), uint64(1426516743)) check("Size", block.Size(), common.StorageSize(len(blockEnc))) tx1 := NewTransaction(0, common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87"), big.NewInt(10), big.NewInt(50000), big.NewInt(10), nil) |