aboutsummaryrefslogtreecommitdiffstats
path: root/light/odr_util.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-08 13:49:23 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-08 13:49:23 +0800
commiteb07dbb0790fc0f5fe5b3192da6b4d04d844239f (patch)
treefc202b98db400d6760799dfa0e8e588b8375045e /light/odr_util.go
parent55599ee95d4151a2502465e0afc7c47bd1acba77 (diff)
downloadgo-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar.gz
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar.bz2
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar.lz
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar.xz
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.tar.zst
go-tangerine-eb07dbb0790fc0f5fe5b3192da6b4d04d844239f.zip
eth, light: minor light client startup cleanups
Diffstat (limited to 'light/odr_util.go')
-rw-r--r--light/odr_util.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/light/odr_util.go b/light/odr_util.go
index a0eb6303d..33a8e80ce 100644
--- a/light/odr_util.go
+++ b/light/odr_util.go
@@ -58,17 +58,14 @@ func GetHeaderByNumber(ctx context.Context, odr OdrBackend, number uint64) (*typ
}
}
}
-
if number >= chtCount*ChtFrequency {
return nil, ErrNoTrustedCht
}
-
r := &ChtRequest{ChtRoot: GetChtRoot(db, chtCount-1, sectionHead), ChtNum: chtCount - 1, BlockNum: number}
if err := odr.Retrieve(ctx, r); err != nil {
return nil, err
- } else {
- return r.Header, nil
}
+ return r.Header, nil
}
func GetCanonicalHash(ctx context.Context, odr OdrBackend, number uint64) (common.Hash, error) {