mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Fix lots of typos.
This commit is contained in:
@@ -252,7 +252,7 @@ impl<T: BeaconChainTypes + 'static> MessageHandler<T> {
|
||||
fn handle_gossip(&mut self, peer_id: PeerId, gossip_message: PubsubMessage) {
|
||||
match gossip_message {
|
||||
PubsubMessage::Block(message) => {
|
||||
let _should_foward_on =
|
||||
let _should_forward_on =
|
||||
self.sync
|
||||
.on_block_gossip(peer_id, message, &mut self.network_context);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ pub struct PartialBeaconBlock {
|
||||
impl PartialBeaconBlock {
|
||||
/// Attempts to build a block.
|
||||
///
|
||||
/// Does not comsume the `PartialBeaconBlock`.
|
||||
/// Does not consume the `PartialBeaconBlock`.
|
||||
pub fn attempt_complete(&self) -> PartialBeaconBlockCompletion {
|
||||
if self.header.is_none() {
|
||||
PartialBeaconBlockCompletion::MissingHeader(self.slot)
|
||||
|
||||
@@ -186,7 +186,7 @@ impl<T: BeaconChainTypes> SimpleSync<T> {
|
||||
"reason" => "network_id"
|
||||
);
|
||||
|
||||
network.disconnect(peer_id.clone(), GoodbyeReason::IrreleventNetwork);
|
||||
network.disconnect(peer_id.clone(), GoodbyeReason::IrrelevantNetwork);
|
||||
} else if remote.latest_finalized_epoch <= local.latest_finalized_epoch
|
||||
&& remote.latest_finalized_root != self.chain.spec.zero_hash
|
||||
&& local.latest_finalized_root != self.chain.spec.zero_hash
|
||||
@@ -202,7 +202,7 @@ impl<T: BeaconChainTypes> SimpleSync<T> {
|
||||
"peer" => format!("{:?}", peer_id),
|
||||
"reason" => "different finalized chain"
|
||||
);
|
||||
network.disconnect(peer_id.clone(), GoodbyeReason::IrreleventNetwork);
|
||||
network.disconnect(peer_id.clone(), GoodbyeReason::IrrelevantNetwork);
|
||||
} else if remote.latest_finalized_epoch < local.latest_finalized_epoch {
|
||||
// The node has a lower finalized epoch, their chain is not useful to us. There are two
|
||||
// cases where a node can have a lower finalized epoch:
|
||||
@@ -529,7 +529,7 @@ impl<T: BeaconChainTypes> SimpleSync<T> {
|
||||
.import_queue
|
||||
.enqueue_bodies(res.block_bodies, peer_id.clone());
|
||||
|
||||
// Attempt to process all recieved bodies by recursively processing the latest block
|
||||
// Attempt to process all received bodies by recursively processing the latest block
|
||||
if let Some(root) = last_root {
|
||||
match self.attempt_process_partial_block(peer_id, root, network, &"rpc") {
|
||||
Some(BlockProcessingOutcome::Processed { block_root: _ }) => {
|
||||
@@ -606,7 +606,7 @@ impl<T: BeaconChainTypes> SimpleSync<T> {
|
||||
}
|
||||
// Note: known blocks are forwarded on the gossip network.
|
||||
//
|
||||
// We rely upon the lower layers (libp2p) to stop loops occuring from re-gossiped
|
||||
// We rely upon the lower layers (libp2p) to stop loops occurring from re-gossiped
|
||||
// blocks.
|
||||
BlockProcessingOutcome::BlockIsAlreadyKnown => SHOULD_FORWARD_GOSSIP_BLOCK,
|
||||
_ => SHOULD_NOT_FORWARD_GOSSIP_BLOCK,
|
||||
@@ -837,7 +837,7 @@ impl<T: BeaconChainTypes> SimpleSync<T> {
|
||||
|
||||
// If the parent is in the `import_queue` attempt to complete it then process it.
|
||||
match self.attempt_process_partial_block(peer_id, parent, network, source) {
|
||||
// If processing parent is sucessful, re-process block and remove parent from queue
|
||||
// If processing parent is successful, re-process block and remove parent from queue
|
||||
Some(BlockProcessingOutcome::Processed { block_root: _ }) => {
|
||||
self.import_queue.remove(parent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user