diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-30 01:28:55 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-01-30 01:28:55 +0800 |
commit | 1cfea1113ac90b5214560ea6db923106f638c4b8 (patch) | |
tree | 5a539d60640da4ee4b1ddd62f703f715523c411a /core | |
parent | 726852e3d3ba5c2167bbdb3bdd3ecbaff6b4f242 (diff) | |
parent | 6488a392a347d0d47212fdc78386e3e0e5841d7d (diff) | |
download | dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar.gz dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar.bz2 dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar.lz dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar.xz dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.tar.zst dexon-1cfea1113ac90b5214560ea6db923106f638c4b8.zip |
Merge branch 'qt5.4' of github.com:ethereum/go-ethereum into qt5.4
Diffstat (limited to 'core')
-rw-r--r-- | core/filter.go | 21 |
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 |