From 716e9364c47f0e3e9c716d95e4020743fe0df421 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Fri, 1 Nov 2024 20:26:19 +0800 Subject: [PATCH] Fix truncate substraction overflow Signed-off-by: Eval EXEC --- src/traits/offchain_impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/traits/offchain_impls.rs b/src/traits/offchain_impls.rs index ee8e9c1f..4c8c6ceb 100644 --- a/src/traits/offchain_impls.rs +++ b/src/traits/offchain_impls.rs @@ -199,7 +199,7 @@ impl OffchainTransactionDependencyProvider { .into_iter() .partition(|(_k, v)| { *v >= current_tip_block_number - || (v - current_tip_block_number) >= KEEP_BLOCK_PERIOD + || (current_tip_block_number - v) >= KEEP_BLOCK_PERIOD }); self.tx_tip_num_map = keep; self.txs = self