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 | |
parent | f5c7d1c8eb202b850541a3fcfc2e9bd4ee6f70a9 (diff) | |
download | go-tangerine-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.gz go-tangerine-16e95f33b73b21dc77c7aab40b9764ecc38382a5.tar.zst go-tangerine-16e95f33b73b21dc77c7aab40b9764ecc38382a5.zip |
whisper: Fix interpretation of `to` parameter in `shh_requestMessages` (#16996)
The argument is inclusive rather than exclusive, according to docs.
-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() |