aboutsummaryrefslogtreecommitdiffstats
path: root/les/api_backend.go
diff options
context:
space:
mode:
authorZsolt Felfoldi <zsfelfoldi@gmail.com>2017-08-19 03:52:20 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-09-06 16:13:13 +0800
commit4ea4d2dc3473afd9d2eda6ef6b359accce1f0946 (patch)
treee651cfc2e3aa36083b333bf34dc3cccef2623f26 /les/api_backend.go
parent1e67378df879b1ce566f17dd95a3b126056254b5 (diff)
downloaddexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar.gz
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar.bz2
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar.lz
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar.xz
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.tar.zst
dexon-4ea4d2dc3473afd9d2eda6ef6b359accce1f0946.zip
core, eth: add bloombit indexer, filter based on it
Diffstat (limited to 'les/api_backend.go')
-rw-r--r--les/api_backend.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/les/api_backend.go b/les/api_backend.go
index 1323e8864..c2ba27028 100644
--- a/les/api_backend.go
+++ b/les/api_backend.go
@@ -19,6 +19,7 @@ package les
import (
"context"
"math/big"
+ "time"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
@@ -28,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/eth/downloader"
+ "github.com/ethereum/go-ethereum/eth/filters"
"github.com/ethereum/go-ethereum/eth/gasprice"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
@@ -171,3 +173,19 @@ func (b *LesApiBackend) EventMux() *event.TypeMux {
func (b *LesApiBackend) AccountManager() *accounts.Manager {
return b.eth.accountManager
}
+
+func (b *LesApiBackend) GetBloomBits(ctx context.Context, bitIdx uint64, sectionIdxList []uint64) ([][]byte, error) {
+ return nil, nil // implemented in a subsequent PR
+}
+
+func (b *LesApiBackend) BloomBitsSections() uint64 {
+ return 0
+}
+
+func (b *LesApiBackend) BloomBitsConfig() filters.BloomConfig {
+ return filters.BloomConfig{
+ SectionSize: 32768,
+ MaxRequestLen: 16,
+ MaxRequestWait: time.Microsecond * 100,
+ }
+}