aboutsummaryrefslogtreecommitdiffstats
path: root/core/filter.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-22 20:12:01 +0800
committerobscuren <geffobscura@gmail.com>2015-02-22 20:12:01 +0800
commit483d96a89d68023360d211ab329400f4b960fe48 (patch)
tree985a6cd9d713cb36e57064da5b465d8810bc42d0 /core/filter.go
parentbba7ccb07f08e0c6ad404abfb363deaec1db5fab (diff)
downloadgo-tangerine-483d96a89d68023360d211ab329400f4b960fe48.tar.gz
go-tangerine-483d96a89d68023360d211ab329400f4b960fe48.tar.zst
go-tangerine-483d96a89d68023360d211ab329400f4b960fe48.zip
Added eth_logs & fixed issue with manual log filtering
* Implemented `eth_logs` * Fixed issue with `filter.Find()` where logs were appended to an incorrect, non-returned slice resulting in no logs found
Diffstat (limited to 'core/filter.go')
-rw-r--r--core/filter.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/filter.go b/core/filter.go
index 88f12a67c..cdf7b282d 100644
--- a/core/filter.go
+++ b/core/filter.go
@@ -111,14 +111,14 @@ func (self *Filter) Find() state.Logs {
// current parameters
if self.bloomFilter(block) {
// Get the logs of the block
- logs, err := self.eth.BlockProcessor().GetLogs(block)
+ unfiltered, err := self.eth.BlockProcessor().GetLogs(block)
if err != nil {
chainlogger.Warnln("err: filter get logs ", err)
break
}
- logs = append(logs, self.FilterLogs(logs)...)
+ logs = append(logs, self.FilterLogs(unfiltered)...)
}
block = self.eth.ChainManager().GetBlock(block.ParentHash())
@@ -146,7 +146,6 @@ func (self *Filter) FilterLogs(logs state.Logs) state.Logs {
Logs:
for _, log := range logs {
if !includes(self.address, log.Address()) {
- //if !bytes.Equal(self.address, log.Address()) {
continue
}