Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed Aug 18, 2024
1 parent cb10db5 commit 348cfb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions substrate-node/pallets/pallet-smart-contract/src/billing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ impl<T: Config> Pallet<T> {
_ = Self::handle_grace(&mut contract, has_sufficient_fund, current_block);

if has_sufficient_fund {
log::info!("Billing contract_id: {:?}, Contract state: {:?}, This cycle amount due: {:?}, Total (include previous overdraft) {:?}", contract.contract_id, contract.state, total_amount_due, total_amount_to_reserve);
log::info!("Billing contract_id: {:?}, Contract state: {:?}, This cycle amount due: {:?}, Total (include previous overdraft) {:?}",
contract.contract_id,
contract.state,
total_amount_due,
total_amount_to_reserve
);
Self::reserve_funds(
&mut contract_payment_state,
standard_amount_due,
Expand Down Expand Up @@ -495,7 +500,7 @@ impl<T: Config> Pallet<T> {

// Orchestrate the distribution of rewards
// Emits RewardDistributed event
// No-Op if contract nither in deleted state nor the distribution frequency is reached
// No-Op if contract neither in deleted state nor the distribution frequency is reached
fn remit_funds(
contract: &types::Contract<T>,
contract_payment_state: &mut types::ContractPaymentState<BalanceOf<T>>,
Expand Down Expand Up @@ -530,7 +535,7 @@ impl<T: Config> Pallet<T> {
let distributed_additional_amount = additional_rewards.saturating_sub(remainder);
if remainder > BalanceOf::<T>::zero() {
log::warn!(
"distributing additional rewards, should rewarded: {:?}, actual {:?}",
"Distributing additional rewards, should reward: {:?}, actual {:?}",
additional_rewards,
distributed_additional_amount
);
Expand Down Expand Up @@ -705,7 +710,7 @@ impl<T: Config> Pallet<T> {
match res {
Ok(remainder) => {
if !(remainder.is_zero()) {
// shouldn't happen, unless onchain logic was chanegd and introduce a liquid restriction on to the source account
// This shouldn't happen, unless onchain logic was changed and a liquid restriction was introduced to the source account
log::warn!(
"Failed to distribute the whole amount: want {:?}, remainder {:?}",
amount,
Expand Down
1 change: 1 addition & 0 deletions substrate-node/pallets/pallet-smart-contract/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ where
}
}
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Encode, Decode, Default, Debug, TypeInfo)]
pub struct SolutionProvider<AccountId> {
pub solution_provider_id: u64,
Expand Down

0 comments on commit 348cfb9

Please sign in to comment.