aboutsummaryrefslogtreecommitdiffstats
path: root/les/server.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-11-09 08:20:49 +0800
committerFelix Lange <fjl@twurst.com>2016-11-09 09:19:07 +0800
commitbe3865211c2d8f71e0733b17c469881502e89371 (patch)
tree1b92be622d4d54d7f7d2ecfb9652c9a071172cd6 /les/server.go
parent0f19cbc6e5b842fb271eedeed47f433d0c63ff2e (diff)
downloaddexon-be3865211c2d8f71e0733b17c469881502e89371.tar
dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.gz
dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.bz2
dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.lz
dexon-be3865211c2d8f71e0733b17c469881502e89371.tar.xz
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/server.go')
-rw-r--r--les/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/les/server.go b/les/server.go
index 874586a7e..0f0e2db42 100644
--- a/les/server.go
+++ b/les/server.go
@@ -279,12 +279,12 @@ func (pm *ProtocolManager) blockLoop() {
if len(peers) > 0 {
header := ev.Data.(core.ChainHeadEvent).Block.Header()
hash := header.Hash()
- number := header.GetNumberU64()
+ number := header.Number.Uint64()
td := core.GetTd(pm.chainDb, hash, number)
if td != nil && td.Cmp(lastBroadcastTd) > 0 {
var reorg uint64
if lastHead != nil {
- reorg = lastHead.GetNumberU64() - core.FindCommonAncestor(pm.chainDb, header, lastHead).GetNumberU64()
+ reorg = lastHead.Number.Uint64() - core.FindCommonAncestor(pm.chainDb, header, lastHead).Number.Uint64()
}
lastHead = header
lastBroadcastTd = td