aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisper.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/whisper.go')
-rw-r--r--whisper/whisper.go9
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)),