This commit is contained in:
GoodDaisy 2023-10-19 22:05:15 +00:00
parent c6583bb5fa
commit 90f78d141f
12 changed files with 16 additions and 16 deletions

View File

@ -34,7 +34,7 @@ pub enum Error {
SigSlotStartIsNone, SigSlotStartIsNone,
/// Failed to construct a LightClientFinalityUpdate from state. /// Failed to construct a LightClientFinalityUpdate from state.
FailedConstructingUpdate, FailedConstructingUpdate,
/// Beacon chain error occured. /// Beacon chain error occurred.
BeaconChainError(BeaconChainError), BeaconChainError(BeaconChainError),
LightClientUpdateError(LightClientUpdateError), LightClientUpdateError(LightClientUpdateError),
} }

View File

@ -37,7 +37,7 @@ pub enum Error {
FailedConstructingUpdate, FailedConstructingUpdate,
/// Unknown block with parent root. /// Unknown block with parent root.
UnknownBlockParentRoot(Hash256), UnknownBlockParentRoot(Hash256),
/// Beacon chain error occured. /// Beacon chain error occurred.
BeaconChainError(BeaconChainError), BeaconChainError(BeaconChainError),
LightClientUpdateError(LightClientUpdateError), LightClientUpdateError(LightClientUpdateError),
} }

View File

@ -99,7 +99,7 @@ pub async fn broadcast_address_changes<T: BeaconChainTypes>(
messages: vec![pubsub_message], messages: vec![pubsub_message],
}; };
// It seems highly unlikely that this unbounded send will fail, but // 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) { if let Err(e) = network_send.send(message) {
debug!( debug!(
log, log,

View File

@ -13,7 +13,7 @@ pub enum Error {
/// Some `Eth1Block` was provided with the same block number but different data. The source /// Some `Eth1Block` was provided with the same block number but different data. The source
/// of eth1 data is inconsistent. /// of eth1 data is inconsistent.
Conflicting(u64), 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 }, NonConsecutive { given: u64, expected: u64 },
/// Some invariant was violated, there is a likely bug in the code. /// Some invariant was violated, there is a likely bug in the code.
Internal(String), Internal(String),

View File

@ -386,8 +386,8 @@ pub struct JsonPayloadAttributes {
} }
impl From<PayloadAttributes> for JsonPayloadAttributes { impl From<PayloadAttributes> for JsonPayloadAttributes {
fn from(payload_atributes: PayloadAttributes) -> Self { fn from(payload_attributes: PayloadAttributes) -> Self {
match payload_atributes { match payload_attributes {
PayloadAttributes::V1(pa) => Self::V1(JsonPayloadAttributesV1 { PayloadAttributes::V1(pa) => Self::V1(JsonPayloadAttributesV1 {
timestamp: pa.timestamp, timestamp: pa.timestamp,
prev_randao: pa.prev_randao, prev_randao: pa.prev_randao,

View File

@ -123,7 +123,7 @@ pub struct Config {
/// Subscribe to all subnets for the duration of the runtime. /// Subscribe to all subnets for the duration of the runtime.
pub subscribe_all_subnets: bool, 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. /// runtime.
pub import_all_attestations: bool, pub import_all_attestations: bool,

View File

@ -849,7 +849,7 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
} }
/// Inform the peer that their request produced an error. /// Inform the peer that their request produced an error.
pub fn send_error_reponse( pub fn send_error_response(
&mut self, &mut self,
peer_id: PeerId, peer_id: PeerId,
id: PeerRequestId, id: PeerRequestId,
@ -1603,7 +1603,7 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
} => { } => {
match reason { match reason {
Ok(_) => { Ok(_) => {
debug!(self.log, "Listener gracefuly closed"; "addresses" => ?addresses) debug!(self.log, "Listener gracefully closed"; "addresses" => ?addresses)
} }
Err(reason) => { Err(reason) => {
crit!(self.log, "Listener abruptly closed"; "addresses" => ?addresses, "reason" => ?reason) crit!(self.log, "Listener abruptly closed"; "addresses" => ?addresses, "reason" => ?reason)

View File

@ -715,7 +715,7 @@ fn test_tcp_blocks_by_range_single_empty_rpc() {
} }
// Tests a streamed, chunked BlocksByRoot RPC Message // 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 // which is greater than the Snappy frame size. Hence, this test
// serves to test the snappy framing format as well. // serves to test the snappy framing format as well.
#[test] #[test]

View File

@ -229,7 +229,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
)> { )> {
let network_log = executor.log().clone(); let network_log = executor.log().clone();
// build the channels for external comms // build the channels for external comms
let (network_senders, network_recievers) = NetworkSenders::new(); let (network_senders, network_receivers) = NetworkSenders::new();
#[cfg(feature = "disable-backfill")] #[cfg(feature = "disable-backfill")]
warn!( warn!(
@ -344,7 +344,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
let NetworkReceivers { let NetworkReceivers {
network_recv, network_recv,
validator_subscription_recv, validator_subscription_recv,
} = network_recievers; } = network_receivers;
// create the network service and spawn the task // create the network service and spawn the task
let network_log = network_log.new(o!("service" => "network")); let network_log = network_log.new(o!("service" => "network"));
@ -635,7 +635,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
id, id,
reason, reason,
} => { } => {
self.libp2p.send_error_reponse(peer_id, id, error, reason); self.libp2p.send_error_response(peer_id, id, error, reason);
} }
NetworkMessage::UPnPMappingEstablished { mappings } => { NetworkMessage::UPnPMappingEstablished { mappings } => {
self.upnp_mappings = mappings; self.upnp_mappings = mappings;

View File

@ -280,7 +280,7 @@ impl<T: BeaconChainTypes, C: BlockStorage> ChainCollection<T, C> {
old_id = Some(Some(syncing_id)); old_id = Some(Some(syncing_id));
} else { } else {
// chains have the same number of peers, pick the currently syncing // 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; new_id = syncing_id;
old_id = Some(None); old_id = Some(None);
} }

View File

@ -464,7 +464,7 @@ mod tests {
log: slog::Logger, log: slog::Logger,
/// To check what does sync send to the beacon processor. /// To check what does sync send to the beacon processor.
beacon_processor_rx: mpsc::Receiver<BeaconWorkEvent<E>>, 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>, chain: Arc<FakeStorage>,
/// Needed by range to handle communication with the network. /// Needed by range to handle communication with the network.
cx: SyncNetworkContext<TestBeaconChainType>, cx: SyncNetworkContext<TestBeaconChainType>,

View File

@ -328,7 +328,7 @@ pub fn get_config<E: EthSpec>(
.write_all(jwt_secret_key.as_bytes()) .write_all(jwt_secret_key.as_bytes())
.map_err(|e| { .map_err(|e| {
format!( format!(
"Error occured while writing to jwt_secret_key file: {:?}", "Error occurred while writing to jwt_secret_key file: {:?}",
e e
) )
})?; })?;