From 4f1b3267bcd8a57f3a33c6300ec082698c12bbca Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 6 Mar 2018 19:48:23 +0100 Subject: [PATCH] whisper: style fix --- cmd/wnode/main.go | 8 +++++--- whisper/whisperv6/envelope.go | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/wnode/main.go b/cmd/wnode/main.go index 095280e141..988c50ce3d 100644 --- a/cmd/wnode/main.go +++ b/cmd/wnode/main.go @@ -309,8 +309,10 @@ func startServer() error { configureNode() } - if *fileExMode || *fileReader { - fmt.Printf("Please type the file name. To quit type: '%s'\n", quitCommand) + if *fileExMode { + fmt.Printf("Please type the file name to be send. To quit type: '%s'\n", quitCommand) + } else if *fileReader { + fmt.Printf("Please type the file name to be decrypted. To quit type: '%s'\n", quitCommand) } else if !*forwarderMode { fmt.Printf("Please type the message. To quit type: '%s'\n", quitCommand) } @@ -696,7 +698,7 @@ func requestExpiredMessagesLoop() { for { timeLow = scanUint("Please enter the lower limit of the time range (unix timestamp): ") timeUpp = scanUint("Please enter the upper limit of the time range (unix timestamp): ") - t = scanLine("Please enter the topic (hexadecimal). For all topics just press Enter: ") + t = scanLine("Enter the topic (hex). Press enter to request all messages, regardless of the topic: ") if len(t) == whisper.TopicLength*2 { x, err := hex.DecodeString(t) if err != nil { diff --git a/whisper/whisperv6/envelope.go b/whisper/whisperv6/envelope.go index b5b9bd45ae..c42d1fa8ac 100644 --- a/whisper/whisperv6/envelope.go +++ b/whisper/whisperv6/envelope.go @@ -270,6 +270,8 @@ func TopicToBloom(topic TopicType) []byte { return b } +// GetEnvelope retrieves an envelope from the message queue by its hash. +// It returns nil if the envelope can not be found. func (w *Whisper) GetEnvelope(hash common.Hash) *Envelope { w.poolMu.RLock() defer w.poolMu.RUnlock()