mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
unify with NumberU64
This commit is contained in:
parent
80b529ea71
commit
1d0044bd67
1 changed files with 5 additions and 1 deletions
|
|
@ -127,6 +127,10 @@ func (h *Header) Hash() common.Hash {
|
|||
return rlpHash(h)
|
||||
}
|
||||
|
||||
func (h *Header) NumberU64() uint64 {
|
||||
return h.Number.Uint64()
|
||||
}
|
||||
|
||||
var headerSize = common.StorageSize(reflect.TypeOf(Header{}).Size())
|
||||
|
||||
// Size returns the approximate memory used by all internal contents. It is used
|
||||
|
|
@ -400,7 +404,7 @@ func (b *Block) GasUsed() uint64 { return b.header.GasUsed }
|
|||
func (b *Block) Difficulty() *big.Int { return new(big.Int).Set(b.header.Difficulty) }
|
||||
func (b *Block) Time() uint64 { return b.header.Time }
|
||||
|
||||
func (b *Block) NumberU64() uint64 { return b.header.Number.Uint64() }
|
||||
func (b *Block) NumberU64() uint64 { return b.header.NumberU64() }
|
||||
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 }
|
||||
|
|
|
|||
Loading…
Reference in a new issue