change HashFor to HashingFor (#14483)

* change HashFor to HashingFor

* fmt

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
This commit is contained in:
Marijn Schouten
2023-07-25 18:24:14 +02:00
committed by GitHub
parent 00787a10e9
commit c9b54e10ff
26 changed files with 180 additions and 161 deletions
@@ -304,7 +304,10 @@ where
.propose_with(inherent_data, inherent_digests, deadline, block_size_limit)
.await;
if tx.send(res).is_err() {
trace!(target: LOG_TARGET, "Could not send block production result to proposer!");
trace!(
target: LOG_TARGET,
"Could not send block production result to proposer!"
);
}
}),
);
@@ -384,7 +387,10 @@ where
for inherent in inherents {
match block_builder.push(inherent) {
Err(ApplyExtrinsicFailed(Validity(e))) if e.exhausted_resources() => {
warn!(target: LOG_TARGET, "⚠️ Dropping non-mandatory inherent from overweight block.")
warn!(
target: LOG_TARGET,
"⚠️ Dropping non-mandatory inherent from overweight block."
)
},
Err(ApplyExtrinsicFailed(Validity(e))) if e.was_mandatory() => {
error!(
@@ -393,7 +399,10 @@ where
return Err(ApplyExtrinsicFailed(Validity(e)))
},
Err(e) => {
warn!(target: LOG_TARGET, "❗️ Inherent extrinsic returned unexpected error: {}. Dropping.", e);
warn!(
target: LOG_TARGET,
"❗️ Inherent extrinsic returned unexpected error: {}. Dropping.", e
);
},
Ok(_) => {},
}
@@ -449,9 +458,10 @@ where
let now = (self.now)();
if now > deadline {
debug!(target: LOG_TARGET,
debug!(
target: LOG_TARGET,
"Consensus deadline reached when pushing block transactions, \
proceeding with proposing."
proceeding with proposing."
);
break EndProposingReason::HitDeadline
}
@@ -465,21 +475,26 @@ where
pending_iterator.report_invalid(&pending_tx);
if skipped < MAX_SKIPPED_TRANSACTIONS {
skipped += 1;
debug!(target: LOG_TARGET,
debug!(
target: LOG_TARGET,
"Transaction would overflow the block size limit, \
but will try {} more transactions before quitting.",
but will try {} more transactions before quitting.",
MAX_SKIPPED_TRANSACTIONS - skipped,
);
continue
} else if now < soft_deadline {
debug!(target: LOG_TARGET,
debug!(
target: LOG_TARGET,
"Transaction would overflow the block size limit, \
but we still have time before the soft deadline, so \
we will try a bit more."
but we still have time before the soft deadline, so \
we will try a bit more."
);
continue
} else {
debug!(target: LOG_TARGET, "Reached block size limit, proceeding with proposing.");
debug!(
target: LOG_TARGET,
"Reached block size limit, proceeding with proposing."
);
break EndProposingReason::HitBlockSizeLimit
}
}
@@ -504,22 +519,28 @@ where
so we will try a bit more before quitting."
);
} else {
debug!(target: LOG_TARGET, "Reached block weight limit, proceeding with proposing.");
debug!(
target: LOG_TARGET,
"Reached block weight limit, proceeding with proposing."
);
break EndProposingReason::HitBlockWeightLimit
}
},
Err(e) => {
pending_iterator.report_invalid(&pending_tx);
debug!(target: LOG_TARGET, "[{:?}] Invalid transaction: {}", pending_tx_hash, e);
debug!(
target: LOG_TARGET,
"[{:?}] Invalid transaction: {}", pending_tx_hash, e
);
unqueue_invalid.push(pending_tx_hash);
},
}
};
if matches!(end_reason, EndProposingReason::HitBlockSizeLimit) && !transaction_pushed {
warn!(target: LOG_TARGET,
"Hit block size limit of `{}` without including any transaction!",
block_size_limit,
warn!(
target: LOG_TARGET,
"Hit block size limit of `{}` without including any transaction!", block_size_limit,
);
}