diff options
author | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2016-10-14 11:51:29 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-09 09:12:53 +0800 |
commit | 9f8d192991c4f68fa14c91366722bbca601da117 (patch) | |
tree | 5c1e089673d3f0208cd4a8208623bb95f29622c9 /eth/filters/api.go | |
parent | 760fd65487614b7a61443cd9371015925795f40f (diff) | |
download | go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar.gz go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar.bz2 go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar.lz go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar.xz go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.tar.zst go-tangerine-9f8d192991c4f68fa14c91366722bbca601da117.zip |
les: light client protocol and API
Diffstat (limited to 'eth/filters/api.go')
-rw-r--r-- | eth/filters/api.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/eth/filters/api.go b/eth/filters/api.go index 3bc220348..fa4bef283 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -61,12 +61,14 @@ type PublicFilterAPI struct { } // NewPublicFilterAPI returns a new PublicFilterAPI instance. -func NewPublicFilterAPI(chainDb ethdb.Database, mux *event.TypeMux) *PublicFilterAPI { +func NewPublicFilterAPI(backend Backend, lightMode bool) *PublicFilterAPI { api := &PublicFilterAPI{ - mux: mux, - chainDb: chainDb, - events: NewEventSystem(mux), - filters: make(map[rpc.ID]*filter), + backend: backend, + useMipMap: !lightMode, + mux: backend.EventMux(), + chainDb: backend.ChainDb(), + events: NewEventSystem(backend.EventMux(), backend, lightMode), + filters: make(map[rpc.ID]*filter), } go api.timeoutLoop() |