aboutsummaryrefslogtreecommitdiffstats
path: root/xeth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-10-17 03:35:24 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-10-17 03:35:24 +0800
commit10ed107ba2001d1aabba3d319ba88c5ce6e8fdc0 (patch)
tree7c79e36cadcc57a8c936f06838a061cdf7e3fd8a /xeth
parentc5ef2afda56c069fda5528c48bd3d831b81455dc (diff)
parent6dc14788a238f3e0ec786c6c04d476a3b957e645 (diff)
downloaddexon-10ed107ba2001d1aabba3d319ba88c5ce6e8fdc0.tar.gz
dexon-10ed107ba2001d1aabba3d319ba88c5ce6e8fdc0.tar.zst
dexon-10ed107ba2001d1aabba3d319ba88c5ce6e8fdc0.zip
Merge pull request #1899 from obscuren/mipmap-bloom
core, eth/filters, miner, xeth: Optimised log filtering
Diffstat (limited to 'xeth')
-rw-r--r--xeth/xeth.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 701932f97..baa8314ad 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -558,11 +558,9 @@ func (self *XEth) NewLogFilter(earliest, latest int64, skip, max int, address []
id := self.filterManager.Add(filter)
self.logQueue[id] = &logQueue{timeout: time.Now()}
- filter.SetEarliestBlock(earliest)
- filter.SetLatestBlock(latest)
- filter.SetSkip(skip)
- filter.SetMax(max)
- filter.SetAddress(cAddress(address))
+ filter.SetBeginBlock(earliest)
+ filter.SetEndBlock(latest)
+ filter.SetAddresses(cAddress(address))
filter.SetTopics(cTopics(topics))
filter.LogsCallback = func(logs vm.Logs) {
self.logMu.Lock()
@@ -667,11 +665,9 @@ func (self *XEth) Logs(id int) vm.Logs {
func (self *XEth) AllLogs(earliest, latest int64, skip, max int, address []string, topics [][]string) vm.Logs {
filter := filters.New(self.backend.ChainDb())
- filter.SetEarliestBlock(earliest)
- filter.SetLatestBlock(latest)
- filter.SetSkip(skip)
- filter.SetMax(max)
- filter.SetAddress(cAddress(address))
+ filter.SetBeginBlock(earliest)
+ filter.SetEndBlock(latest)
+ filter.SetAddresses(cAddress(address))
filter.SetTopics(cTopics(topics))
return filter.Find()