diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-17 02:46:46 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-17 02:46:46 +0800 |
commit | 03ac0f18ae8bcc9c2f843841b8fe322717616a21 (patch) | |
tree | 76ac005fd885feb42765d3e6d24fa1dbb99dde2f /whisper/whisper.go | |
parent | e5e265d024403a779297cbaf5aa0f8759e3e76e4 (diff) | |
download | dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar.gz dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar.bz2 dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar.lz dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar.xz dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.tar.zst dexon-03ac0f18ae8bcc9c2f843841b8fe322717616a21.zip |
Initial support to remove Whisper identities per #491
Diffstat (limited to 'whisper/whisper.go')
-rw-r--r-- | whisper/whisper.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go index 13209f9a6..c80ba3c8e 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -116,6 +116,15 @@ func (self *Whisper) GetIdentity(key *ecdsa.PublicKey) *ecdsa.PrivateKey { return self.keys[string(crypto.FromECDSAPub(key))] } +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 +} + func (self *Whisper) Watch(opts Filter) int { return self.filters.Install(filter.Generic{ Str1: string(crypto.FromECDSAPub(opts.To)), |