From fc0eb600f367ecaeb7307dd8ff520927b4e5855f Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Wed, 27 Dec 2017 15:21:31 +0300 Subject: [PATCH] checked_sub -> saturating_sub --- secret_store/src/listener/service_contract.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secret_store/src/listener/service_contract.rs b/secret_store/src/listener/service_contract.rs index deed4da3e..b7e365bed 100644 --- a/secret_store/src/listener/service_contract.rs +++ b/secret_store/src/listener/service_contract.rs @@ -301,7 +301,7 @@ impl Iterator for PendingRequestsIterator { /// Get hash of the last block with at least n confirmations. fn get_confirmed_block_hash(client: &Client, confirmations: u64) -> Option { client.block_number(BlockId::Latest) - .and_then(|b| b.checked_sub(confirmations)) + .map(|b| b.saturating_sub(confirmations)) .and_then(|b| client.block_hash(BlockId::Number(b))) }