diff options
Diffstat (limited to 'core/types/block.go')
-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 |