From e868518fdb4500710a8208068ad4a26904a74bce Mon Sep 17 00:00:00 2001 From: Vladislav Date: Tue, 19 Dec 2023 18:17:17 -0300 Subject: [PATCH] Fix overflow (#464) * Fix overflow * Revert "subxt update (#462)" This reverts commit 687ff2f5989ebb1ad37e054b9bb198baeadc9f6b. --- hyperspace/parachain/src/provider.rs | 2 +- utils/subxt/generated/src/composable/parachain.rs | 2 +- utils/subxt/generated/src/picasso_kusama/parachain.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hyperspace/parachain/src/provider.rs b/hyperspace/parachain/src/provider.rs index 8a563ecd8..ab48355c2 100644 --- a/hyperspace/parachain/src/provider.rs +++ b/hyperspace/parachain/src/provider.rs @@ -709,7 +709,7 @@ where // this update is required let base = if cfg!(test) { (session_length / 2) as u64 } else { (session_length / 12) as u64 }; - let diff = latest_height - latest_client_height_on_counterparty; + let diff = latest_height.saturating_sub(latest_client_height_on_counterparty); let pruning_len = 256; Ok(diff >= base.min(pruning_len as u64)) } diff --git a/utils/subxt/generated/src/composable/parachain.rs b/utils/subxt/generated/src/composable/parachain.rs index c75eba666..769a8eee9 100644 --- a/utils/subxt/generated/src/composable/parachain.rs +++ b/utils/subxt/generated/src/composable/parachain.rs @@ -31585,7 +31585,7 @@ pub mod api { module_id: ::std::vec::Vec<::core::primitive::u8>, }, #[codec(index = 24)] - PushWasmCode { wasm_code_id: ::std::vec::Vec<::core::primitive::u8> }, + PushWasmCode { wasm_checksum: ::std::vec::Vec<::core::primitive::u8> }, } } pub mod ics20_fee { diff --git a/utils/subxt/generated/src/picasso_kusama/parachain.rs b/utils/subxt/generated/src/picasso_kusama/parachain.rs index 4c9db4414..36e5bedb6 100644 --- a/utils/subxt/generated/src/picasso_kusama/parachain.rs +++ b/utils/subxt/generated/src/picasso_kusama/parachain.rs @@ -35933,7 +35933,7 @@ pub mod api { module_id: ::std::vec::Vec<::core::primitive::u8>, }, #[codec(index = 24)] - PushWasmCode { wasm_code_id: ::std::vec::Vec<::core::primitive::u8> }, + PushWasmCode { wasm_checksum: ::std::vec::Vec<::core::primitive::u8> }, } } pub mod ics20_fee {