aboutsummaryrefslogtreecommitdiffstats
path: root/les/request_test.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/request_test.go
parent0f19cbc6e5b842fb271eedeed47f433d0c63ff2e (diff)
downloadgo-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 'les/request_test.go')
-rw-r--r--les/request_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/les/request_test.go b/les/request_test.go
index df02afb32..77788d4a9 100644
--- a/les/request_test.go
+++ b/les/request_test.go
@@ -42,7 +42,7 @@ func TestCodeAccessLes1(t *testing.T) { testAccess(t, 1, tfCodeAccess) }
func tfCodeAccess(db ethdb.Database, bhash common.Hash, number uint64) light.OdrRequest {
header := core.GetHeader(db, bhash, core.GetBlockNumber(db, bhash))
- if header.GetNumberU64() < testContractDeployed {
+ if header.Number.Uint64() < testContractDeployed {
return nil
}
sti := light.StateTrieID(header)
@@ -66,7 +66,7 @@ func testAccess(t *testing.T, protocol int, fn accessTestFn) {
lpm.synchronise(lpeer)
test := func(expFail uint64) {
- for i := uint64(0); i <= pm.blockchain.CurrentHeader().GetNumberU64(); i++ {
+ for i := uint64(0); i <= pm.blockchain.CurrentHeader().Number.Uint64(); i++ {
bhash := core.GetCanonicalHash(db, i)
if req := fn(ldb, bhash, i); req != nil {
ctx, _ := context.WithTimeout(context.Background(), 200*time.Millisecond)