From 7056e82374f3a2e5b2aac17294075aa62427347f Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 15 Mar 2017 22:54:02 +0100 Subject: [PATCH] whisper: bugfix --- whisper/whisperv5/doc.go | 2 +- whisper/whisperv5/envelope.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/whisper/whisperv5/doc.go b/whisper/whisperv5/doc.go index 58f2bd9852..d60868f670 100644 --- a/whisper/whisperv5/doc.go +++ b/whisper/whisperv5/doc.go @@ -57,7 +57,7 @@ const ( keyIdSize = 32 DefaultMaxMessageLength = 1024 * 1024 - DefaultMinimumPoW = 2.0 // todo: review after testing. + DefaultMinimumPoW = 1.0 // todo: review after testing. padSizeLimitLower = 128 // it can not be less - we don't want to reveal the absence of signature padSizeLimitUpper = 256 // just an arbitrary number, could be changed without losing compatibility diff --git a/whisper/whisperv5/envelope.go b/whisper/whisperv5/envelope.go index 5d882d5dc2..94a091b200 100644 --- a/whisper/whisperv5/envelope.go +++ b/whisper/whisperv5/envelope.go @@ -95,6 +95,9 @@ func (e *Envelope) Seal(options *MessageParams) error { e.Expiry += options.WorkTime } else { target = e.powToFirstBit(options.PoW) + if target < 1 { + target = 1 + } } buf := make([]byte, 64)