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.
The bulk of the issue was to adapt to the new requirement
that a v6 filter has to either contain a symmertric key or
an asymmetric one.
This commits revert one of the fixes that I made to remove
a linter warning: unexporting NewSentMessage. This is not
really a problem as I have a cleanup in the pipe that will
solve this issue.
* whisper: fixes warnings from the code linter
* whisper: more non-API-breaking changes
The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.
* whisper: un-export NewSentMessage to please the linter
This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.
* whisper: update gencodec output after upgrading it to new lint standards