Filter accepts multiple topics per entry. Fixes #403

This commit is contained in:
obscuren
2015-03-01 19:08:26 +01:00
parent ac88ae86a3
commit 6e50a1e9f5
4 changed files with 40 additions and 104 deletions

View File

@ -6,7 +6,6 @@ import (
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/ui"
"github.com/ethereum/go-ethereum/xeth"
"github.com/obscuren/otto"
)
@ -96,17 +95,3 @@ func (self *JSEthereum) toVal(v interface{}) otto.Value {
return result
}
func (self *JSEthereum) Messages(object map[string]interface{}) otto.Value {
filter := ui.NewFilterFromMap(object, self.ethereum)
logs := filter.Find()
var jslogs []JSLog
for _, m := range logs {
jslogs = append(jslogs, NewJSLog(m))
}
v, _ := self.vm.ToValue(jslogs)
return v
}