From 4cbd03f62b7144f97cfea8379662745f51ee32ed Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin Date: Fri, 31 Jan 2020 17:27:10 +0100 Subject: [PATCH] Small follow-up docs improvements in rent module (#4790) * Small follow-up docs improvements in rent module * Update frame/contracts/src/rent.rs Co-Authored-By: thiolliere * Use a shorter version of the sentence Co-authored-by: thiolliere --- substrate/frame/contracts/src/rent.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/substrate/frame/contracts/src/rent.rs b/substrate/frame/contracts/src/rent.rs index bbcc07c714..49beebbf0c 100644 --- a/substrate/frame/contracts/src/rent.rs +++ b/substrate/frame/contracts/src/rent.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . +//! A module responsible for computing the right amount of weight and charging it. + use crate::{ AliveContractInfo, BalanceOf, ContractInfo, ContractInfoOf, Module, RawEvent, TombstoneContractInfo, Trait, @@ -130,8 +132,8 @@ fn rent_budget( /// Consider the case for rent payment of the given account and returns a `Verdict`. /// -/// The `current_block_number` must be equal to the current block number. Use `handicap` do -/// change the reference block number. (See `snitch_contract_should_be_evicted` for more details). +/// Use `handicap` in case you want to change the reference block number. (To get more details see +/// `snitch_contract_should_be_evicted` ). fn consider_case( account: &T::AccountId, current_block_number: T::BlockNumber, @@ -285,7 +287,7 @@ pub fn collect_rent(account: &T::AccountId) -> Option> enact_verdict(account, alive_contract_info, current_block_number, verdict) } -/// Process a snitch that a contract under the given address should be evicted. +/// Process a report that a contract under the given address should be evicted. /// /// Enact the eviction right away if the contract should be evicted and return true. /// Otherwise, **do nothing** and return false.