Skip to content

Commit

Permalink
fix typos (#4838)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodDaisy committed Oct 19, 2023
1 parent c6583bb commit 90f78d1
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum Error {
SigSlotStartIsNone,
/// Failed to construct a LightClientFinalityUpdate from state.
FailedConstructingUpdate,
/// Beacon chain error occured.
/// Beacon chain error occurred.
BeaconChainError(BeaconChainError),
LightClientUpdateError(LightClientUpdateError),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum Error {
FailedConstructingUpdate,
/// Unknown block with parent root.
UnknownBlockParentRoot(Hash256),
/// Beacon chain error occured.
/// Beacon chain error occurred.
BeaconChainError(BeaconChainError),
LightClientUpdateError(LightClientUpdateError),
}
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/client/src/address_change_broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub async fn broadcast_address_changes<T: BeaconChainTypes>(
messages: vec![pubsub_message],
};
// It seems highly unlikely that this unbounded send will fail, but
// we handle the result nontheless.
// we handle the result nonetheless.
if let Err(e) = network_send.send(message) {
debug!(
log,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/eth1/src/block_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub enum Error {
/// Some `Eth1Block` was provided with the same block number but different data. The source
/// of eth1 data is inconsistent.
Conflicting(u64),
/// The given block was not one block number higher than the higest known block number.
/// The given block was not one block number higher than the highest known block number.
NonConsecutive { given: u64, expected: u64 },
/// Some invariant was violated, there is a likely bug in the code.
Internal(String),
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/execution_layer/src/engine_api/json_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ pub struct JsonPayloadAttributes {
}

impl From<PayloadAttributes> for JsonPayloadAttributes {
fn from(payload_atributes: PayloadAttributes) -> Self {
match payload_atributes {
fn from(payload_attributes: PayloadAttributes) -> Self {
match payload_attributes {
PayloadAttributes::V1(pa) => Self::V1(JsonPayloadAttributesV1 {
timestamp: pa.timestamp,
prev_randao: pa.prev_randao,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub struct Config {
/// Subscribe to all subnets for the duration of the runtime.
pub subscribe_all_subnets: bool,

/// Import/aggregate all attestations recieved on subscribed subnets for the duration of the
/// Import/aggregate all attestations received on subscribed subnets for the duration of the
/// runtime.
pub import_all_attestations: bool,

Expand Down
4 changes: 2 additions & 2 deletions beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
}

/// Inform the peer that their request produced an error.
pub fn send_error_reponse(
pub fn send_error_response(
&mut self,
peer_id: PeerId,
id: PeerRequestId,
Expand Down Expand Up @@ -1603,7 +1603,7 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
} => {
match reason {
Ok(_) => {
debug!(self.log, "Listener gracefuly closed"; "addresses" => ?addresses)
debug!(self.log, "Listener gracefully closed"; "addresses" => ?addresses)
}
Err(reason) => {
crit!(self.log, "Listener abruptly closed"; "addresses" => ?addresses, "reason" => ?reason)
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/tests/rpc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ fn test_tcp_blocks_by_range_single_empty_rpc() {
}

// Tests a streamed, chunked BlocksByRoot RPC Message
// The size of the reponse is a full `BeaconBlock`
// The size of the response is a full `BeaconBlock`
// which is greater than the Snappy frame size. Hence, this test
// serves to test the snappy framing format as well.
#[test]
Expand Down
6 changes: 3 additions & 3 deletions beacon_node/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
)> {
let network_log = executor.log().clone();
// build the channels for external comms
let (network_senders, network_recievers) = NetworkSenders::new();
let (network_senders, network_receivers) = NetworkSenders::new();

#[cfg(feature = "disable-backfill")]
warn!(
Expand Down Expand Up @@ -344,7 +344,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
let NetworkReceivers {
network_recv,
validator_subscription_recv,
} = network_recievers;
} = network_receivers;

// create the network service and spawn the task
let network_log = network_log.new(o!("service" => "network"));
Expand Down Expand Up @@ -635,7 +635,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
id,
reason,
} => {
self.libp2p.send_error_reponse(peer_id, id, error, reason);
self.libp2p.send_error_response(peer_id, id, error, reason);
}
NetworkMessage::UPnPMappingEstablished { mappings } => {
self.upnp_mappings = mappings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ impl<T: BeaconChainTypes, C: BlockStorage> ChainCollection<T, C> {
old_id = Some(Some(syncing_id));
} else {
// chains have the same number of peers, pick the currently syncing
// chain to avoid unnecesary switchings and try to advance it
// chain to avoid unnecessary switchings and try to advance it
new_id = syncing_id;
old_id = Some(None);
}
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/network/src/sync/range_sync/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ mod tests {
log: slog::Logger,
/// To check what does sync send to the beacon processor.
beacon_processor_rx: mpsc::Receiver<BeaconWorkEvent<E>>,
/// To set up different scenarios where sync is told about known/unkown blocks.
/// To set up different scenarios where sync is told about known/unknown blocks.
chain: Arc<FakeStorage>,
/// Needed by range to handle communication with the network.
cx: SyncNetworkContext<TestBeaconChainType>,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub fn get_config<E: EthSpec>(
.write_all(jwt_secret_key.as_bytes())
.map_err(|e| {
format!(
"Error occured while writing to jwt_secret_key file: {:?}",
"Error occurred while writing to jwt_secret_key file: {:?}",
e
)
})?;
Expand Down

0 comments on commit 90f78d1

Please sign in to comment.