Unverified Commit 6c426c24 authored by Gavin Wood's avatar Gavin Wood Committed by GitHub
Browse files

Fix overflow in crowdfunding module (#771)

* Fix overflow in crowdfunding module

* Bump impl version
parent e99340b5
......@@ -395,7 +395,10 @@ decl_module! {
let fund = Self::funds(index).ok_or("invalid fund index")?;
ensure!(fund.parachain.is_none(), "cannot dissolve fund with active parachain");
let now = <system::Module<T>>::block_number();
ensure!(now >= fund.end + T::RetirementPeriod::get(), "retirement period not over");
ensure!(
now >= fund.end.saturating_add(T::RetirementPeriod::get()),
"retirement period not over"
);
let account = Self::fund_account_id(index);
......
......@@ -78,7 +78,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
impl_name: create_runtime_str!("parity-kusama"),
authoring_version: 2,
spec_version: 1040,
impl_version: 1,
impl_version: 2,
apis: RUNTIME_API_VERSIONS,
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment