pallet-contracts: Refactor and comment rent module. (#4733)

* Refactor and comment `rent` module.

* impl_version bump

* Add doc for Exempt

* Simplify code.

* Update bin/node/runtime/src/lib.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* Update frame/contracts/src/exec.rs

Co-Authored-By: Hero Bird <robin.freyler@gmail.com>

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Hero Bird <robbepop@web.de>
This commit is contained in:
Sergei Pepyakin
2020-01-27 17:40:57 +01:00
committed by GitHub
parent 957ea8ba46
commit f39335d638
4 changed files with 195 additions and 110 deletions
+3 -3
View File
@@ -356,10 +356,10 @@ where
});
}
// Assumption: pay_rent doesn't collide with overlay because
// pay_rent will be done on first call and dest contract and balance
// Assumption: `collect_rent` doesn't collide with overlay because
// `collect_rent` will be done on first call and destination contract and balance
// cannot be changed before the first call
let contract_info = rent::pay_rent::<T>(&dest);
let contract_info = rent::collect_rent::<T>(&dest);
// Calls to dead contracts always fail.
if let Some(ContractInfo::Tombstone(_)) = contract_info {