diff options
author | Felföldi Zsolt <zsfelfoldi@gmail.com> | 2018-08-16 04:25:46 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-08-16 04:25:46 +0800 |
commit | 2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2 (patch) | |
tree | 128c3fe2780f604f9eac5d7ff2292994ed2102f6 /light/odr.go | |
parent | e8752f4e9f9be3d2932cd4835a5d72d17ac2338b (diff) | |
download | go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.gz go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.bz2 go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.lz go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.xz go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.tar.zst go-tangerine-2cdf6ee7e00d6127c372e7a28bb27a80ef495cb2.zip |
light: CHT and bloom trie indexers working in light mode (#16534)
This PR enables the indexers to work in light client mode by
downloading a part of these tries (the Merkle proofs of the last
values of the last known section) in order to be able to add new
values and recalculate subsequent hashes. It also adds CHT data to
NodeInfo.
Diffstat (limited to 'light/odr.go')
-rw-r--r-- | light/odr.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/light/odr.go b/light/odr.go index 8f1e50b81..83c64055a 100644 --- a/light/odr.go +++ b/light/odr.go @@ -20,6 +20,7 @@ package light import ( "context" + "errors" "math/big" "github.com/ethereum/go-ethereum/common" @@ -33,6 +34,9 @@ import ( // service is not required. var NoOdr = context.Background() +// ErrNoPeers is returned if no peers capable of serving a queued request are available +var ErrNoPeers = errors.New("no suitable peers available") + // OdrBackend is an interface to a backend service that handles ODR retrievals type type OdrBackend interface { Database() ethdb.Database |