aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-29 23:52:00 +0800
committerobscuren <geffobscura@gmail.com>2015-01-29 23:52:00 +0800
commit6488a392a347d0d47212fdc78386e3e0e5841d7d (patch)
treeed95cdf67028b2b60ddc7850728abe9a391796bf /core
parentddf17d93acf92ef18b0134f19f22220362e06bad (diff)
downloadgo-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar.gz
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar.bz2
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar.lz
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar.xz
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.tar.zst
go-tangerine-6488a392a347d0d47212fdc78386e3e0e5841d7d.zip
Reimplemented message filters for rpc calls
Diffstat (limited to 'core')
-rw-r--r--core/filter.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/filter.go b/core/filter.go
index efdd819ed..d154e7b7a 100644
--- a/core/filter.go
+++ b/core/filter.go
@@ -12,6 +12,17 @@ type AccountChange struct {
Address, StateAddress []byte
}
+type FilterOptions struct {
+ Earliest int64
+ Latest int64
+
+ Address []byte
+ Topics [][]byte
+
+ Skip int
+ Max int
+}
+
// Filtering interface
type Filter struct {
eth EthManager
@@ -32,6 +43,16 @@ func NewFilter(eth EthManager) *Filter {
return &Filter{eth: eth}
}
+func (self *Filter) SetOptions(options FilterOptions) {
+ self.earliest = options.Earliest
+ self.latest = options.Latest
+ self.skip = options.Skip
+ self.max = options.Max
+ self.address = options.Address
+ self.topics = options.Topics
+
+}
+
// Set the earliest and latest block for filtering.
// -1 = latest block (i.e., the current block)
// hash = particular hash from-to