triedb/pathdb: allow single-element history ranges (#33329)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
Forostovec 2025-12-01 04:19:21 +02:00 committed by GitHub
parent cd3f9b24e9
commit 6f2cbb7a27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ func sanitizeRange(start, end uint64, freezer ethdb.AncientReader) (uint64, uint
last = end
}
// Make sure the range is valid
if first >= last {
if first > last {
return 0, 0, fmt.Errorf("range is invalid, first: %d, last: %d", first, last)
}
return first, last, nil