Просмотр исходного кода

block_store: include end value in get_order_by_range queries

Updated `get_order_by_range` to use an inclusive range (`..=`), ensuring the `end` value is part of the result.
kalm 1 год назад
Родитель
Сommit
5a3eb06497
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/blockchain/block_store.rs

+ 1 - 1
src/blockchain/block_store.rs

@@ -522,7 +522,7 @@ impl BlockStore {
         let start_key = start.to_be_bytes();
         let end_key = end.to_be_bytes();
 
-        for block in self.order.range(start_key..end_key) {
+        for block in self.order.range(start_key..=end_key) {
             blocks.push(parse_u32_key_record(block.unwrap())?);
         }