avoid re-using of to_block during rotation of block_range

Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
Uncle Stinky
2025-06-18 17:20:25 +03:00
parent 6100e79ebf
commit 39a6192d28
3 changed files with 4 additions and 4 deletions

View File

@@ -699,8 +699,8 @@ impl<T: Config> Pallet<T> {
match result_block_range {
Ok(maybe_block_range) => {
let request_body = match maybe_block_range {
Some((from_block, to_block)) if from_block < to_block =>
Self::prepare_request_body_for_latest_transfers(from_block, to_block, network_data),
Some((from_block, to_block)) if from_block < to_block.saturating_sub(1) =>
Self::prepare_request_body_for_latest_transfers(from_block, to_block.saturating_sub(1), network_data),
_ => Self::prepare_request_body_for_latest_block(network_data),
};