Improve parameter naming in `Whisper.DeleteKeyPair`

This commit is contained in:
Pedro Pombeiro 2019-12-17 21:54:46 +01:00 committed by Pedro Pombeiro
parent 0cf24d2c3e
commit ef87c330ce
7 changed files with 15 additions and 15 deletions

View File

@ -85,9 +85,9 @@ func (w *gethWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) {
return w.whisper.AddKeyPair(key)
}
// DeleteKeyPair deletes the specified key if it exists.
func (w *gethWhisperWrapper) DeleteKeyPair(key string) bool {
return w.whisper.DeleteKeyPair(key)
// DeleteKeyPair deletes the key with the specified ID if it exists.
func (w *gethWhisperWrapper) DeleteKeyPair(keyID string) bool {
return w.whisper.DeleteKeyPair(keyID)
}
func (w *gethWhisperWrapper) AddSymKeyDirect(key []byte) (string, error) {

View File

@ -164,10 +164,10 @@ func (w *nimbusWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
return retVal.(string), nil
}
// DeleteKeyPair deletes the specified key if it exists.
func (w *nimbusWhisperWrapper) DeleteKeyPair(key string) bool {
// DeleteKeyPair deletes the key with the specified ID if it exists.
func (w *nimbusWhisperWrapper) DeleteKeyPair(keyID string) bool {
return w.routineQueue.Send(func(c chan<- interface{}) {
keyC, err := decodeHexID(key)
keyC, err := decodeHexID(keyID)
if err != nil {
c <- err
return

View File

@ -51,8 +51,8 @@ type Whisper interface {
// AddKeyPair imports a asymmetric private key and returns a deterministic identifier.
AddKeyPair(key *ecdsa.PrivateKey) (string, error)
// DeleteKeyPair deletes the specified key if it exists.
DeleteKeyPair(key string) bool
// DeleteKeyPair deletes the key with the specified ID if it exists.
DeleteKeyPair(keyID string) bool
AddSymKeyDirect(key []byte) (string, error)
AddSymKeyFromPassword(password string) (string, error)
DeleteSymKey(id string) bool

View File

@ -85,9 +85,9 @@ func (w *gethWhisperWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) {
return w.whisper.AddKeyPair(key)
}
// DeleteKeyPair deletes the specified key if it exists.
func (w *gethWhisperWrapper) DeleteKeyPair(key string) bool {
return w.whisper.DeleteKeyPair(key)
// DeleteKeyPair deletes the key with the specified ID if it exists.
func (w *gethWhisperWrapper) DeleteKeyPair(keyID string) bool {
return w.whisper.DeleteKeyPair(keyID)
}
func (w *gethWhisperWrapper) AddSymKeyDirect(key []byte) (string, error) {

View File

@ -51,8 +51,8 @@ type Whisper interface {
// AddKeyPair imports a asymmetric private key and returns a deterministic identifier.
AddKeyPair(key *ecdsa.PrivateKey) (string, error)
// DeleteKeyPair deletes the specified key if it exists.
DeleteKeyPair(key string) bool
// DeleteKeyPair deletes the key with the specified ID if it exists.
DeleteKeyPair(keyID string) bool
AddSymKeyDirect(key []byte) (string, error)
AddSymKeyFromPassword(password string) (string, error)
DeleteSymKey(id string) bool

View File

@ -597,7 +597,7 @@ func (whisper *Whisper) NewKeyPair() (string, error) {
return id, nil
}
// DeleteKeyPair deletes the specified key if it exists.
// DeleteKeyPair deletes the key with the specified ID if it exists.
func (whisper *Whisper) DeleteKeyPair(key string) bool {
deterministicID, err := toDeterministicID(key, keyIDSize)
if err != nil {

View File

@ -597,7 +597,7 @@ func (whisper *Whisper) NewKeyPair() (string, error) {
return id, nil
}
// DeleteKeyPair deletes the specified key if it exists.
// DeleteKeyPair deletes the key with the specified ID if it exists.
func (whisper *Whisper) DeleteKeyPair(key string) bool {
deterministicID, err := toDeterministicID(key, keyIDSize)
if err != nil {