aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/filter.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-18 08:33:04 +0800
committerobscuren <geffobscura@gmail.com>2015-04-18 08:33:04 +0800
commitc39a7b5c0d2002d72df7a0517ccc6edd7557ab7d (patch)
tree6d5bea52157c4fa04de8402fe4aaf375b78801df /whisper/filter.go
parent89fd752659c5c11b243c30f739781d723cac82c2 (diff)
parent7dc6c338736b05fa239316f5764fb3ffec6ec6c2 (diff)
downloaddexon-c39a7b5c0d2002d72df7a0517ccc6edd7557ab7d.tar.gz
dexon-c39a7b5c0d2002d72df7a0517ccc6edd7557ab7d.tar.zst
dexon-c39a7b5c0d2002d72df7a0517ccc6edd7557ab7d.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'whisper/filter.go')
-rw-r--r--whisper/filter.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/whisper/filter.go b/whisper/filter.go
index b33f2c1a2..8fcc45afd 100644
--- a/whisper/filter.go
+++ b/whisper/filter.go
@@ -1,10 +1,13 @@
+// Contains the message filter for fine grained subscriptions.
+
package whisper
import "crypto/ecdsa"
+// Filter is used to subscribe to specific types of whisper messages.
type Filter struct {
- To *ecdsa.PublicKey
- From *ecdsa.PublicKey
- Topics [][]byte
- Fn func(*Message)
+ To *ecdsa.PublicKey // Recipient of the message
+ From *ecdsa.PublicKey // Sender of the message
+ Topics []Topic // Topics to watch messages on
+ Fn func(*Message) // Handler in case of a match
}