diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-04 04:04:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-04 04:04:31 +0800 |
commit | 26de12d9bf23bce7de26b3b6629601ec2e58ad5b (patch) | |
tree | 0d4b76fcb717049d988b7f283967f43dc5517a5e /core/types | |
parent | e9f1e868e2bc0205d0b7655cd07fcaba9b2bc97d (diff) | |
download | go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar.gz go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar.bz2 go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar.lz go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar.xz go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.tar.zst go-tangerine-26de12d9bf23bce7de26b3b6629601ec2e58ad5b.zip |
Changed nonce to a uint64
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/block.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/types/block.go b/core/types/block.go index 673c72003..358d0bc2d 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -39,8 +39,8 @@ type Header struct { Time uint64 // Extra data Extra string - // Block Nonce for verification - Nonce ethutil.Bytes + // Nonce + Nonce uint64 // Mix digest for quick checking to prevent DOS MixDigest ethutil.Bytes // SeedHash used for light client verification @@ -94,7 +94,7 @@ type Block struct { Reward *big.Int } -func NewBlock(parentHash []byte, coinbase []byte, root []byte, difficulty *big.Int, nonce []byte, extra string) *Block { +func NewBlock(parentHash []byte, coinbase []byte, root []byte, difficulty *big.Int, nonce uint64, extra string) *Block { header := &Header{ Root: root, ParentHash: parentHash, @@ -195,7 +195,7 @@ func (self *Block) Number() *big.Int { return self.header.Number } func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } func (self *Block) MixDigest() []byte { return self.header.MixDigest } func (self *Block) SeedHash() []byte { return self.header.SeedHash } -func (self *Block) Nonce() []byte { return self.header.Nonce } +func (self *Block) Nonce() uint64 { return self.header.Nonce } func (self *Block) Bloom() []byte { return self.header.Bloom } func (self *Block) Coinbase() []byte { return self.header.Coinbase } func (self *Block) Time() int64 { return int64(self.header.Time) } @@ -267,7 +267,7 @@ func (self *Header) String() string { GasUsed: %v Time: %v Extra: %v - Nonce: %x + Nonce: %d MixDigest: %x SeedHash: %x |