diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-09 08:20:49 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-09 09:19:07 +0800 |
commit | be3865211c2d8f71e0733b17c469881502e89371 (patch) | |
tree | 1b92be622d4d54d7f7d2ecfb9652c9a071172cd6 /core/types | |
parent | 0f19cbc6e5b842fb271eedeed47f433d0c63ff2e (diff) | |
download | go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar.gz go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar.bz2 go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar.lz go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar.xz go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.tar.zst go-tangerine-be3865211c2d8f71e0733b17c469881502e89371.zip |
core/types: remove header accessors
These accessors were introduced by light client changes, but
the only method that is actually used is GetNumberU64. This
commit replaces all uses of .GetNumberU64 with .Number.Uint64.
Diffstat (limited to 'core/types')
-rw-r--r-- | core/types/block.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/core/types/block.go b/core/types/block.go index 4accb0ee3..fedcfdbbe 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -116,15 +116,6 @@ type jsonHeader struct { Nonce *BlockNonce `json:"nonce"` } -func (h *Header) GetNumber() *big.Int { return new(big.Int).Set(h.Number) } -func (h *Header) GetGasLimit() *big.Int { return new(big.Int).Set(h.GasLimit) } -func (h *Header) GetGasUsed() *big.Int { return new(big.Int).Set(h.GasUsed) } -func (h *Header) GetDifficulty() *big.Int { return new(big.Int).Set(h.Difficulty) } -func (h *Header) GetTime() *big.Int { return new(big.Int).Set(h.Time) } -func (h *Header) GetNumberU64() uint64 { return h.Number.Uint64() } -func (h *Header) GetNonce() uint64 { return binary.BigEndian.Uint64(h.Nonce[:]) } -func (h *Header) GetExtra() []byte { return common.CopyBytes(h.Extra) } - // Hash returns the block hash of the header, which is simply the keccak256 hash of its // RLP encoding. func (h *Header) Hash() common.Hash { |