diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-17 21:45:44 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-28 15:47:35 +0800 |
commit | 3563c59b12b0b8b5fd15847bf97d71dfd8416207 (patch) | |
tree | f059a2bcbd7edb25c595bbad30514828fc1a5282 /whisper | |
parent | 182d484aa70bcd5b22117f02333b1fd3b1535dcb (diff) | |
download | dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar.gz dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar.bz2 dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar.lz dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar.xz dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.tar.zst dexon-3563c59b12b0b8b5fd15847bf97d71dfd8416207.zip |
rpc, whisper, xeth: polish whisper RPC interface
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/whisper.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go index 9317fad50..59a1a63c4 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -58,6 +58,8 @@ type Whisper struct { quit chan struct{} } +// New creates a Whisper client ready to communicate through the Ethereum P2P +// network. func New() *Whisper { whisper := &Whisper{ filters: filter.New(), @@ -148,7 +150,7 @@ func (self *Whisper) Stop() { glog.V(logger.Info).Infoln("Whisper stopped") } -// Messages retrieves the currently pooled messages matching a filter id. +// Messages retrieves all the currently pooled messages matching a filter id. func (self *Whisper) Messages(id int) []*Message { messages := make([]*Message, 0) if filter := self.filters.Get(id); filter != nil { @@ -163,15 +165,6 @@ func (self *Whisper) Messages(id int) []*Message { return messages } -// func (self *Whisper) RemoveIdentity(key *ecdsa.PublicKey) bool { -// k := string(crypto.FromECDSAPub(key)) -// if _, ok := self.keys[k]; ok { -// delete(self.keys, k) -// return true -// } -// return false -// } - // handlePeer is called by the underlying P2P layer when the whisper sub-protocol // connection is negotiated. func (self *Whisper) handlePeer(peer *p2p.Peer, rw p2p.MsgReadWriter) error { |