diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
commit | ba996f5e27572e853bcc5c815ae72082a15c9183 (patch) | |
tree | 16d6fd41d3d77208597683c71bdc9af603d43a77 /whisper/whisperv5/message.go | |
parent | 64bf5bafe9ced66bfb11f34fed9181aa89399473 (diff) | |
download | go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.gz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.bz2 go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.lz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.xz go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.zst go-tangerine-ba996f5e27572e853bcc5c815ae72082a15c9183.zip |
whisper: refactoring (#3411)
* whisper: refactored message processing
* whisper: final polishing
* whisper: logging updated
* whisper: moved the check, changed the default PoW
* whisper: refactoring of message queuing
* whisper: refactored parameters
Diffstat (limited to 'whisper/whisperv5/message.go')
-rw-r--r-- | whisper/whisperv5/message.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/whisper/whisperv5/message.go b/whisper/whisperv5/message.go index f3812b1d8..a095f7c0c 100644 --- a/whisper/whisperv5/message.go +++ b/whisper/whisperv5/message.go @@ -14,9 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. -// Contains the Whisper protocol Message element. For formal details please see -// the specs at https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec#messages. -// todo: fix the spec link, and move it to doc.go +// Contains the Whisper protocol Message element. package whisperv5 @@ -256,7 +254,11 @@ func (msg *SentMessage) Wrap(options *MessageParams) (envelope *Envelope, err er } envelope = NewEnvelope(options.TTL, options.Topic, salt, nonce, msg) - envelope.Seal(options) + err = envelope.Seal(options) + if err != nil { + return nil, err + } + return envelope, nil } |