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 /les/fetcher.go | |
parent | 0f19cbc6e5b842fb271eedeed47f433d0c63ff2e (diff) | |
download | dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.gz dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.zst dexon-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 'les/fetcher.go')
-rw-r--r-- | les/fetcher.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/les/fetcher.go b/les/fetcher.go index 3fa5cf0e2..d93b7db37 100644 --- a/les/fetcher.go +++ b/les/fetcher.go @@ -103,7 +103,7 @@ func (f *lightFetcher) gotHeader(header *types.Header) { if peerList == nil { return } - number := header.GetNumberU64() + number := header.Number.Uint64() td := core.GetTd(f.pm.chainDb, hash, number) for _, peer := range peerList { peer.lock.Lock() @@ -201,7 +201,7 @@ func (f *lightFetcher) processResponse(req fetchRequest, resp fetchResponse) boo return false } for _, header := range headers { - td := core.GetTd(f.pm.chainDb, header.Hash(), header.GetNumberU64()) + td := core.GetTd(f.pm.chainDb, header.Hash(), header.Number.Uint64()) if td == nil { return false } |