Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
upbqdn committed Jan 24, 2025
1 parent 05a9b61 commit 1836375
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion book/src/dev/rfcs/0003-inventory-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ specific inventory request is ready, because until we get the request, we
can't determine which peers might be required to process it.

We could attempt to ensure that the peer set would be ready to process a
specific inventory request would be to pre-emptively "reserve" a peer as soon
specific inventory request would be to preemptively "reserve" a peer as soon
as it advertises an inventory item. But this doesn't actually work to ensure
readiness, because a peer could advertise two inventory items, and only be
able to service one request at a time. It also potentially locks the peer
Expand Down
4 changes: 2 additions & 2 deletions book/src/dev/rfcs/0006-contextual-difficulty.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,10 @@ would be a security issue.
# Future possibilities
[future-possibilities]: #future-possibilities

## Re-using the relevant chain API in other contextual checks
## Reusing the relevant chain API in other contextual checks
[relevant-chain-api-reuse]: #relevant-chain-api-reuse

The relevant chain iterator can be re-used to implement other contextual
The relevant chain iterator can be reused to implement other contextual
validation checks.

For example, responding to peer requests for block locators, which means
Expand Down
2 changes: 1 addition & 1 deletion book/src/dev/rfcs/drafts/0005-treestate.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ finished validating everything that can be validated without the context of
their anchor's finalization state.

So for each transaction, for both `Spend` descriptions and `JoinSplit`s, we can
pre-emptively try to do our consensus check by looking up the anchors in our
preemptively try to do our consensus check by looking up the anchors in our
finalized set first. For `Spend`s, we then trigger the remaining validation and
when that finishes we are full done with those. For `JoinSplit`s, the anchor
state check may pass early if it's a previous block Sprout `NoteCommitment` tree
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub enum Error {

/// Zebra's type could not be converted to its librustzcash equivalent.
#[error("Zebra's type could not be converted to its librustzcash equivalent: ")]
Convertion(#[from] io::Error),
Conversion(#[from] io::Error),

/// The transaction is missing a network upgrade.
#[error("the transaction is missing a network upgrade")]
Expand Down
2 changes: 1 addition & 1 deletion zebra-chain/src/serialization/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl From<crate::Error> for SerializationError {
fn from(value: crate::Error) -> Self {
match value {
crate::Error::InvalidConsensusBranchId => Self::Parse("invalid consensus branch id"),
crate::Error::Convertion(e) => Self::Io(e),
crate::Error::Conversion(e) => Self::Io(e),
crate::Error::MissingNetworkUpgrade => Self::Parse("missing network upgrade"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion zebra-network/src/peer_set/initialize/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ where
let nil_peer_set = service_fn(move |req| async move {
let rsp = match req {
// Return the correct response variant for Peers requests,
// re-using one of the peers we already provided.
// reusing one of the peers we already provided.
Request::Peers => Response::Peers(vec![fake_peer.unwrap()]),
_ => unreachable!("unexpected request: {:?}", req),
};
Expand Down
4 changes: 2 additions & 2 deletions zebra-test/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub fn zebra_skip_ipv6_tests() -> bool {
/// to - it has a small risk of port conflicts.
///
/// Use this function when you need to use the same random port multiple
/// times. For example: setting up both ends of a connection, or re-using
/// times. For example: setting up both ends of a connection, or reusing
/// the same port multiple times.
pub fn random_known_port() -> u16 {
use rand::Rng;
Expand Down Expand Up @@ -99,7 +99,7 @@ pub fn random_known_port() -> u16 {
/// between this fn call and binding the tcp listener.
///
/// Use this function when you need to use the same random port multiple
/// times. For example: setting up both ends of a connection, or re-using
/// times. For example: setting up both ends of a connection, or reusing
/// the same port multiple times.
///
/// ## Panics
Expand Down
2 changes: 1 addition & 1 deletion zebrad/src/commands/copy_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ impl CopyStateCmd {
// then deserializes bytes into new `Block` structs when reading.
// So these checks are sufficient to detect block data corruption.
//
// If Zebra starts re-using cached `Block` structs after writing them,
// If Zebra starts reusing cached `Block` structs after writing them,
// we'll also need to check `Block` structs created from the actual database bytes.
if source_block_hash != target_block_commit_hash
|| source_block_hash != target_block_data_hash
Expand Down
2 changes: 1 addition & 1 deletion zebrad/src/components/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ where
// The Hedge middleware is the outermost layer, hedging requests
// between two retry-wrapped networks. The innermost timeout
// layer is relatively unimportant, because slow requests will
// probably be pre-emptively hedged.
// probably be preemptively hedged.
//
// The Hedge goes outside the Retry, because the Retry layer
// abstracts away spurious failures from individual peers
Expand Down
2 changes: 1 addition & 1 deletion zebrad/tests/common/test_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl TestType {
if !use_internet_connection {
config.network.initial_mainnet_peers = IndexSet::new();
config.network.initial_testnet_peers = IndexSet::new();
// Avoid re-using cached peers from disk when we're supposed to be a disconnected instance
// Avoid reusing cached peers from disk when we're supposed to be a disconnected instance
config.network.cache_dir = CacheDir::disabled();

// Activate the mempool immediately by default
Expand Down

0 comments on commit 1836375

Please sign in to comment.