• Guillaume Ballet's avatar
    whisper/whisperv6: fix PoW calculations to match the spec (#19330) · df717abc
    Guillaume Ballet authored
    This PR fixes two issues in the PoW calculation of a Whisper envelope,
    compared to the spec (see PoW Requirements):
    
    - The pow is supposed to take the leading number of zeroes (i.e. most
      significant zeroes) and what it did was to take the number of trailing
      zeroes (i.e. least significant zeroes). It has been fixed to match what
      the spec and Parity does.
    - The spec expects to use the size of the RLP encoded envelope, and it took
      something else, as described in #18070.
    df717abc
envelope_test.go 2.39 KB