Commit 16e95f33 authored by Pedro Pombeiro's avatar Pedro Pombeiro Committed by Guillaume Ballet

whisper: Fix interpretation of `to` parameter in `shh_requestMessages` (#16996)

The argument is inclusive rather than exclusive, according to docs.
parent f5c7d1c8
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment