Convert all UK spelling to US (#2138)

* all the ise

* forgot a misspelling

* a few more replacements

* bump impl

* rollback and fixes

* bump impl again

* Add aliases for RPC

* Update on_demand.rs
This commit is contained in:
joe petrowski
2019-03-29 14:11:45 +01:00
committed by Gav Wood
parent a10e86ba5a
commit 0ddcbf747f
74 changed files with 453 additions and 451 deletions
@@ -58,8 +58,8 @@ decl_runtime_apis! {
/// This should be implemented on the runtime side.
///
/// This is primarily used for negotiating authority-set changes for the
/// gadget. GRANDPA uses a signalling model of changing authority sets:
/// changes should be signalled with a delay of N blocks, and then automatically
/// gadget. GRANDPA uses a signaling model of changing authority sets:
/// changes should be signaled with a delay of N blocks, and then automatically
/// applied in the runtime after those N blocks have passed.
///
/// The consensus protocol will coordinate the handoff externally.
@@ -83,7 +83,7 @@ decl_runtime_apis! {
/// Check a digest for forced changes.
/// Return `None` if there are no forced changes. Otherwise, return a
/// tuple containing the pending change and the median last finalized
/// block number at the time the change was signalled.
/// block number at the time the change was signaled.
///
/// Added in version 2.
///
@@ -136,7 +136,7 @@ where
let hash = pending.canon_hash.clone();
let number = pending.canon_height.clone();
debug!(target: "afg", "Inserting potential standard set change signalled at block {:?} \
debug!(target: "afg", "Inserting potential standard set change signaled at block {:?} \
(delayed by {:?} blocks).",
(&number, &hash), pending.delay);
@@ -257,7 +257,7 @@ where
.take_while(|c| c.effective_number() <= best_number) // to prevent iterating too far
.filter(|c| c.effective_number() == best_number)
{
// check if the given best block is in the same branch as the block that signalled the change.
// check if the given best block is in the same branch as the block that signaled the change.
if is_descendent_of(&change.canon_hash, &best_hash)? {
// apply this change: make the set canonical
info!(target: "finality", "Applying authority set change forced at block #{:?}",
@@ -381,7 +381,7 @@ pub(crate) enum DelayKind<N> {
/// Depth in finalized chain.
Finalized,
/// Depth in best chain. The median last finalized block is calculated at the time the
/// change was signalled.
/// change was signaled.
Best { median_last_finalized: N },
}
@@ -550,7 +550,7 @@ mod tests {
vec![&change_b, &change_a],
);
// finalizing "hash_c" won't enact the change signalled at "hash_a" but it will prune out "hash_b"
// finalizing "hash_c" won't enact the change signaled at "hash_a" but it will prune out "hash_b"
let status = authorities.apply_standard_changes("hash_c", 11, &is_descendent_of(|base, hash| match (*base, *hash) {
("hash_a", "hash_c") => true,
("hash_b", "hash_c") => false,
@@ -564,7 +564,7 @@ mod tests {
vec![&change_a],
);
// finalizing "hash_d" will enact the change signalled at "hash_a"
// finalizing "hash_d" will enact the change signaled at "hash_a"
let status = authorities.apply_standard_changes("hash_d", 15, &is_descendent_of(|base, hash| match (*base, *hash) {
("hash_a", "hash_d") => true,
_ => unreachable!(),
@@ -125,7 +125,7 @@ impl<Block: BlockT<Hash=H256>, B, E, N, RA> grandpa::Chain<Block::Hash, NumberFo
fn best_chain_containing(&self, block: Block::Hash) -> Option<(Block::Hash, NumberFor<Block>)> {
// NOTE: when we finalize an authority set change through the sync protocol the voter is
// signalled asynchronously. therefore the voter could still vote in the next round
// signaled asynchronously. therefore the voter could still vote in the next round
// before activating the new set. the `authority_set` is updated immediately thus we
// restrict the voter based on that.
if self.set_id != self.authority_set.inner().read().current().0 {
@@ -570,7 +570,7 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, PRA> GrandpaBlockImport<B, E, Block, RA
match result {
Err(CommandOrError::VoterCommand(command)) => {
info!(target: "finality", "Imported justification for block #{} that triggers \
command {}, signalling voter.", number, command);
command {}, signaling voter.", number, command);
if let Err(e) = self.send_voter_commands.unbounded_send(command) {
return Err(ConsensusErrorKind::ClientImport(e.to_string()).into());
+1 -1
View File
@@ -297,7 +297,7 @@ impl Core<Block> for RuntimeApi {
unimplemented!("Not required for testing!")
}
fn initialise_block_runtime_api_impl(
fn initialize_block_runtime_api_impl(
&self,
_: &BlockId<Block>,
_: ExecutionContext,