mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
whisper: bugfix
This commit is contained in:
parent
689c6d5599
commit
7056e82374
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue