whisper: Fix interpretation of to parameter in shh_requestMessages (#16996)
				
					
				
			The argument is inclusive rather than exclusive, according to docs.
This commit is contained in:
		
							parent
							
								
									f5c7d1c8eb
								
							
						
					
					
						commit
						16e95f33b7
					
				| @ -118,7 +118,7 @@ func (s *WMailServer) processRequest(peer *whisper.Peer, lower, upper uint32, bl | |||||||
| 	var err error | 	var err error | ||||||
| 	var zero common.Hash | 	var zero common.Hash | ||||||
| 	kl := NewDbKey(lower, zero) | 	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) | 	i := s.db.NewIterator(&util.Range{Start: kl.raw, Limit: ku.raw}, nil) | ||||||
| 	defer i.Release() | 	defer i.Release() | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user