diff options
author | Pedro Pombeiro <PombeirP@users.noreply.github.com> | 2018-09-19 23:44:30 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2018-09-19 23:44:30 +0800 |
commit | 16e95f33b73b21dc77c7aab40b9764ecc38382a5 (patch) | |
tree | b4f64064eb2923bf33eb9e828b22ae44876345aa /whisper | |
parent | f5c7d1c8eb202b850541a3fcfc2e9bd4ee6f70a9 (diff) | |
download | dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.gz dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.bz2 dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.lz dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.xz dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.zst dexon-16e95f33b73b21dc77c7aab40b9764ecc38382a5.zip |
whisper: Fix interpretation of `to` parameter in `shh_requestMessages` (#16996)
The argument is inclusive rather than exclusive, according to docs.
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/mailserver/mailserver.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/whisper/mailserver/mailserver.go b/whisper/mailserver/mailserver.go index d32eaddec..af9418d9f 100644 --- a/whisper/mailserver/mailserver.go +++ b/whisper/mailserver/mailserver.go @@ -118,7 +118,7 @@ func (s *WMailServer) processRequest(peer *whisper.Peer, lower, upper uint32, bl var err error var zero common.Hash kl := NewDbKey(lower, zero) - ku := NewDbKey(upper, zero) + ku := NewDbKey(upper+1, zero) // LevelDB is exclusive, while the Whisper API is inclusive i := s.db.NewIterator(&util.Range{Start: kl.raw, Limit: ku.raw}, nil) defer i.Release() |