From 2bc0f32cb0406e803472fc250be63384fbd0f192 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 7 Jan 2025 12:12:05 +1000 Subject: [PATCH] Fix typos and clarify runtime API docs --- crates/sp-domains/src/lib.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/crates/sp-domains/src/lib.rs b/crates/sp-domains/src/lib.rs index 6a8e2afdfb..52bda2d718 100644 --- a/crates/sp-domains/src/lib.rs +++ b/crates/sp-domains/src/lib.rs @@ -1481,10 +1481,10 @@ sp_api::decl_runtime_apis! { /// Submits the transaction bundle via an unsigned extrinsic. fn submit_bundle_unsigned(opaque_bundle: OpaqueBundle, Block::Hash, DomainHeader, Balance>); - // Submit singleton receipt via an unsigned extrinsic. + // Submits a singleton receipt via an unsigned extrinsic. fn submit_receipt_unsigned(singleton_receipt: SealedSingletonReceipt, Block::Hash, DomainHeader, Balance>); - /// Extract the bundles stored successfully from the given extrinsics. + /// Extracts the bundles successfully stored from the given extrinsics. fn extract_successful_bundles( domain_id: DomainId, extrinsics: Vec, @@ -1493,7 +1493,7 @@ sp_api::decl_runtime_apis! { /// Generates a randomness seed for extrinsics shuffling. fn extrinsics_shuffling_seed() -> Randomness; - /// Returns the WASM bundle for given `domain_id`. + /// Returns the current WASM bundle for the given `domain_id`. fn domain_runtime_code(domain_id: DomainId) -> Option>; /// Returns the runtime id for the given `domain_id`. @@ -1505,13 +1505,13 @@ sp_api::decl_runtime_apis! { /// Returns the domain instance data for the given `domain_id`. fn domain_instance_data(domain_id: DomainId) -> Option<(DomainInstanceData, NumberFor)>; - /// Returns the current timestamp at given height. + /// Returns the current timestamp at the current height. fn timestamp() -> Moment; /// Returns the current Tx range for the given domain Id. fn domain_tx_range(domain_id: DomainId) -> U256; - /// Return the genesis state root if not pruned + /// Returns the genesis state root if not pruned. fn genesis_state_root(domain_id: DomainId) -> Option; /// Returns the best execution chain number. @@ -1526,38 +1526,38 @@ sp_api::decl_runtime_apis! { /// Returns true if there are any ERs in the challenge period with non empty extrinsics. fn non_empty_er_exists(domain_id: DomainId) -> bool; - /// Returns the current best number of the domain. + /// Returns the current best block number for the domain. fn domain_best_number(domain_id: DomainId) -> Option>; - /// Returns the execution receipt + /// Returns the execution receipt with the given hash. fn execution_receipt(receipt_hash: HeaderHashFor) -> Option>; - /// Returns the current epoch and the next epoch operators of the given domain + /// Returns the current epoch and the next epoch operators of the given domain. fn domain_operators(domain_id: DomainId) -> Option<(BTreeMap, Vec)>; - /// Returns the execution receipt hash of the given domain and domain block number + /// Returns the execution receipt hash of the given domain and domain block number. fn receipt_hash(domain_id: DomainId, domain_number: HeaderNumberFor) -> Option>; - /// Return the consensus chain byte fee that will used to charge the domain transaction for consensus - /// chain storage fee + /// Returns the consensus chain byte fee that will used to charge the domain transaction for consensus + /// chain storage fees. fn consensus_chain_byte_fee() -> Balance; - /// Returns the latest confirmed domain block number and hash + /// Returns the latest confirmed domain block number and hash. fn latest_confirmed_domain_block(domain_id: DomainId) -> Option<(HeaderNumberFor, HeaderHashFor)>; - /// Return if the receipt is exist and pending to prune + /// Returns if the receipt is exist and pending to prune fn is_bad_er_pending_to_prune(domain_id: DomainId, receipt_hash: HeaderHashFor) -> bool; - /// Return the balance of the storage fund account + /// Returns the balance of the storage fund account. fn storage_fund_account_balance(operator_id: OperatorId) -> Balance; - /// Return if the domain runtime code is upgraded since `at` + /// Returns true if the given domain's runtime code has been upgraded since `at`. fn is_domain_runtime_upgraded_since(domain_id: DomainId, at: NumberFor) -> Option; - /// Return domain sudo call. + /// Returns the domain sudo calls for the given domain, if any. fn domain_sudo_call(domain_id: DomainId) -> Option>; - /// Return last confirmed domain block execution receipt. + /// Returns the last confirmed domain block execution receipt. fn last_confirmed_domain_block_receipt(domain_id: DomainId) ->Option>; }