Skip to content

Commit

Permalink
Merge pull request #1602 from rex4539/typos
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
zancas authored Dec 25, 2024
2 parents 582fef6 + 374a66c commit 56383d5
Show file tree
Hide file tree
Showing 34 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion libtonode-tests/tests/concrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ mod fast {
)
.unwrap();
// This height doesn't matter, all we need is any arbitrary checkpoint ID
// as witness_at_checkpoint_depth requres a checkpoint to function now
// as witness_at_checkpoint_depth requires a checkpoint to function now
server_orchard_shardtree
.checkpoint(BlockHeight::from_u32(0))
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion zingo-status/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Zingo-Status
//! TODO: Add Crate Discription Here!
//! TODO: Add Crate Description Here!
#![warn(missing_docs)]
#[forbid(unsafe_code)]
Expand Down
2 changes: 1 addition & 1 deletion zingo-sync/src/client/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async fn receive_fetch_requests(
false
}

// TODO: placeholder for algorythm that selects the next fetch request to be processed
// TODO: placeholder for algorithm that selects the next fetch request to be processed
// return `None` if a fetch request could not be selected
fn select_fetch_request(fetch_request_queue: &mut Vec<FetchRequest>) -> Option<FetchRequest> {
// TODO: improve priority logic
Expand Down
6 changes: 3 additions & 3 deletions zingo-sync/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub struct SyncState {
/// A vec of block ranges with scan priorities from wallet birthday to chain tip.
/// In block height order with no overlaps or gaps.
scan_ranges: Vec<ScanRange>,
/// Locators for relevent transactions to the wallet.
/// Locators for relevant transactions to the wallet.
locators: BTreeSet<Locator>,
}

Expand Down Expand Up @@ -287,7 +287,7 @@ pub struct WalletNote<N, Nf: Copy> {
note: N,
/// Derived nullifier
#[getset(get_copy = "pub")]
nullifier: Option<Nf>, //TODO: syncing without nullfiier deriving key
nullifier: Option<Nf>, //TODO: syncing without nullifier deriving key
/// Commitment tree leaf position
#[getset(get_copy = "pub")]
position: Option<Position>,
Expand Down Expand Up @@ -382,7 +382,7 @@ impl SyncOutgoingNotes for OutgoingNote<orchard::Note> {
}
}

// TODO: condsider replacing with address enum instead of encoding to string
// TODO: consider replacing with address enum instead of encoding to string
pub(crate) trait SyncOutgoingNotes {
fn encoded_recipient<P>(&self, parameters: &P) -> String
where
Expand Down
2 changes: 1 addition & 1 deletion zingo-sync/src/scan/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub(crate) fn scan_transaction<P: consensus::Parameters>(
outpoint_map: &mut OutPointMap,
transparent_addresses: &HashMap<String, TransparentAddressId>,
) -> Result<WalletTransaction, ()> {
// TODO: condsider splitting into seperate fns for pending and confirmed etc.
// TODO: consider splitting into separate fns for pending and confirmed etc.
// TODO: price? save in wallet block as its relative to time mined?
let block_height = confirmation_status.get_height();
let zip212_enforcement = zcash_primitives::transaction::components::sapling::zip212_enforcement(
Expand Down
8 changes: 4 additions & 4 deletions zingo-sync/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ where

/// Processes mempool transaction.
///
/// Scan the transaction and add to the wallet if relavent.
/// Scan the transaction and add to the wallet if relevant.
async fn process_mempool_transaction<W>(
consensus_parameters: &impl consensus::Parameters,
ufvks: &HashMap<AccountId, UnifiedFullViewingKey>,
Expand Down Expand Up @@ -389,7 +389,7 @@ async fn process_mempool_transaction<W>(
orchard_derived_nullifiers,
);

// return if transaction is not relavent to the wallet
// return if transaction is not relevant to the wallet
if mempool_transaction.transparent_coins().is_empty()
&& mempool_transaction.sapling_notes().is_empty()
&& mempool_transaction.orchard_notes().is_empty()
Expand Down Expand Up @@ -457,7 +457,7 @@ where
wallet
.update_shard_trees(sapling_located_trees, orchard_located_trees)
.unwrap();
// TODO: add trait to save wallet data to persistance for in-memory wallets
// TODO: add trait to save wallet data to persistence for in-memory wallets

Ok(())
}
Expand Down Expand Up @@ -508,7 +508,7 @@ where
/// Sets up mempool stream.
///
/// If there is some raw transaction, send to be scanned.
/// If the response is `None` (a block was mined) or a timeout error occured, setup a new mempool stream.
/// If the response is `None` (a block was mined) or a timeout error occurred, setup a new mempool stream.
async fn mempool_monitor(
mut client: CompactTxStreamerClient<zingo_netutils::UnderlyingService>,
mempool_transaction_sender: mpsc::Sender<RawTransaction>,
Expand Down
6 changes: 3 additions & 3 deletions zingo-sync/src/sync/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async fn create_scan_range(

/// Resets scan ranges to recover from previous sync interruptions.
///
/// A range that was previously scanning when sync was last interupted should be set to `Verify` in the case that
/// A range that was previously scanning when sync was last interrupted should be set to `Verify` in the case that
/// the scanner may have been in the verification state.
fn reset_scan_ranges(sync_state: &mut SyncState) -> Result<(), ()> {
let scan_ranges = sync_state.scan_ranges_mut();
Expand All @@ -128,7 +128,7 @@ fn reset_scan_ranges(sync_state: &mut SyncState) -> Result<(), ()> {
set_scan_priority(sync_state, scan_range.block_range(), ScanPriority::Verify).unwrap();
}

// TODO: detemine OpenAdjacent priority ranges from the end block of previous ChainTip ranges
// TODO: determine OpenAdjacent priority ranges from the end block of previous ChainTip ranges

Ok(())
}
Expand Down Expand Up @@ -391,7 +391,7 @@ fn select_scan_range(sync_state: &mut SyncState) -> Option<ScanRange> {

scan_ranges.splice(index..=index, split_ranges);

// TODO: when this library has its own version of ScanRange this can be simpified and more readable
// TODO: when this library has its own version of ScanRange this can be simplified and more readable
Some(ScanRange::from_parts(
trimmed_block_range,
highest_priority_scan_range.priority(),
Expand Down
4 changes: 2 additions & 2 deletions zingo-sync/src/sync/transparent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ pub(crate) async fn update_addresses_and_locators<P, W>(

// The transaction is not scanned here, instead the locator is stored to be later sent to a scan task for these reasons:
// - We must search for all relevant transactions MAX_VERIFICATION_WINDOW blocks below wallet height in case of re-org.
// These woud be scanned again which would be inefficient
// - In case of re-org, any scanned transactons with heights within the re-org range would be wrongly invalidated
// These would be scanned again which would be inefficient
// - In case of re-org, any scanned transactions with heights within the re-org range would be wrongly invalidated
// - The locator will cause the surrounding range to be set to high priority which will often also contain shielded notes
// relevant to the wallet
// - Scanning a transaction without scanning the surrounding range of compact blocks in the context of a scan task creates
Expand Down
4 changes: 2 additions & 2 deletions zingo-sync/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::witness::{LocatedTreeData, ShardTrees};

// TODO: clean up interface and move many default impls out of traits. consider merging to a simplified SyncWallet interface.

/// Temporary dump for all neccessary wallet functionality for PoC
/// Temporary dump for all necessary wallet functionality for PoC
pub trait SyncWallet {
/// Errors associated with interfacing the sync engine with wallet data
type Error: Debug;
Expand Down Expand Up @@ -46,7 +46,7 @@ pub trait SyncWallet {
}

/// Helper to allow generic construction of a
/// shardtree Node from raw byte representaiton
/// shardtree Node from raw byte representation
pub(crate) trait FromBytes<const N: usize> {
fn from_bytes(array: [u8; N]) -> Self;
}
Expand Down
2 changes: 1 addition & 1 deletion zingo-sync/src/witness.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Module for stucts and types associated with witness construction
//! Module for structs and types associated with witness construction
use std::collections::BTreeMap;

Expand Down
2 changes: 1 addition & 1 deletion zingocli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! ZingoCli
//! TODO: Add Crate Discription Here!
//! TODO: Add Crate Description Here!
#![forbid(unsafe_code)]
#![warn(missing_docs)]
Expand Down
4 changes: 2 additions & 2 deletions zingolib/src/blaze.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! Depricated! holds sync engine 1.0
//! Deprecated! holds sync engine 1.0
pub(super) mod block_management_reorg_detection;
pub(super) mod fetch_compact_blocks;
pub(super) mod fetch_taddr_transactions;
pub(super) mod full_transactions_processor;
pub(super) mod sync_status;
pub(super) mod syncdata;
pub(super) mod targetted_rescan;
pub(super) mod targeted_rescan;
pub(super) mod trial_decryptions;
pub(super) mod update_notes;

Expand Down
10 changes: 5 additions & 5 deletions zingolib/src/blaze/block_management_reorg_detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl BlockManagementData {
}

/// Ingest the incoming blocks, handle any reorgs, then populate the block data
pub(crate) async fn handle_reorgs_and_populate_block_mangement_data(
pub(crate) async fn handle_reorgs_and_populate_block_management_data(
&self,
start_block: u64,
end_block: u64,
Expand Down Expand Up @@ -573,7 +573,7 @@ impl BlockManagementData {
}
}

/// The components of a BlockMangementData we need to pass to the worker thread
/// The components of a BlockManagementData we need to pass to the worker thread
struct BlockManagementThreadData {
/// List of all downloaded blocks in the current batch and
/// their hashes/commitment trees. Stored with the tallest
Expand Down Expand Up @@ -834,7 +834,7 @@ mod tests {
let (reorg_transmitter, mut reorg_receiver) = mpsc::unbounded_channel();

let (h, cb_sender) = nw
.handle_reorgs_and_populate_block_mangement_data(
.handle_reorgs_and_populate_block_management_data(
start_block,
end_block,
Arc::new(RwLock::new(TxMap::new_with_witness_trees_address_free())),
Expand Down Expand Up @@ -883,7 +883,7 @@ mod tests {
let (reorg_transmitter, mut reorg_receiver) = mpsc::unbounded_channel();

let (h, cb_sender) = nw
.handle_reorgs_and_populate_block_mangement_data(
.handle_reorgs_and_populate_block_management_data(
start_block,
end_block,
Arc::new(RwLock::new(TxMap::new_with_witness_trees_address_free())),
Expand Down Expand Up @@ -979,7 +979,7 @@ mod tests {
let (reorg_transmitter, mut reorg_receiver) = mpsc::unbounded_channel();

let (h, cb_sender) = nw
.handle_reorgs_and_populate_block_mangement_data(
.handle_reorgs_and_populate_block_management_data(
start_block,
end_block,
Arc::new(RwLock::new(TxMap::new_with_witness_trees_address_free())),
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion zingolib/src/blaze/update_notes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl UpdateNotes {
{
//info!("Note was spent, just add it as spent for TxId {}", txid);
// we got the height the nullifier was spent at. now, we go back to the index because we need to read from that CompactTx.
// This can only happen after BlazeSyncData has been downloaded into the LightClient from the server and stored asyncronously.
// This can only happen after BlazeSyncData has been downloaded into the LightClient from the server and stored asynchronously.
let (compact_transaction, ts) = bsync_data
.read()
.await
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ impl Command for MessagesFilterCommand {
List memo-containing value transfers sent to/from wallet. If an address is provided,
only messages to/from that address will be provided. If a string is provided,
messages containing that string are displayed. Otherwise, all memos are displayed.
Currently, for recieved messages, this relies on the reply-to address contained in the memo.
Currently, for received messages, this relies on the reply-to address contained in the memo.
A value transfer is a group of all notes to a specific receiver in a transaction.
Usage:
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! ZingConfig
//! TODO: Add Crate Discription Here!
//! TODO: Add Crate Description Here!
#![forbid(unsafe_code)]
#![warn(missing_docs)]
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub mod receivers {
None,
vec![],
)
.expect("memo compatability checked in 'parse_send_args'")
.expect("memo compatibility checked in 'parse_send_args'")
}
}

Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/lightclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pub mod instantiation {
impl LightClient {
// toDo rework ZingoConfig.

/// This is the fundamental invocation of a LightClient. It lives in an asyncronous runtime.
/// This is the fundamental invocation of a LightClient. It lives in an asynchronous runtime.
pub async fn create_from_wallet_async(wallet: LightWallet) -> io::Result<Self> {
let mut buffer: Vec<u8> = vec![];
wallet.write(&mut buffer).await?;
Expand Down
4 changes: 2 additions & 2 deletions zingolib/src/lightclient/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl LightClient {
value_transfers.append(&mut ValueTransfers::create_send_value_transfers(tx));
}
TransactionKind::Received => {
// create 1 received value tansfer for each pool received to
// create 1 received value transfer for each pool received to
if !tx.orchard_notes().is_empty() {
let value: u64 =
tx.orchard_notes().iter().map(|output| output.value()).sum();
Expand Down Expand Up @@ -776,7 +776,7 @@ impl LightClient {
let spendable = transaction_metadata.status.is_confirmed() && note_metadata.spending_tx_status().is_none();

let created_block:u32 = transaction_metadata.status.get_height().into();
// this object should be created by the DomainOuput trait if this doesnt get deprecated
// this object should be created by the DomainOutput trait if this doesnt get deprecated
Some(object!{
"created_in_block" => created_block,
"datetime" => transaction_metadata.datetime,
Expand Down
4 changes: 2 additions & 2 deletions zingolib/src/lightclient/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub mod send_with_proposal {
/// This overwrites confirmation status to Calculated (not Broadcast)
/// so only call this immediately after creating the transaction
///
/// With the introduction of multistep transacations to support ZIP320
/// With the introduction of multistep transactions to support ZIP320
/// we begin ordering transactions in the "spending_data" cache such
/// that any output that's used to fund a subsequent transaction is
/// added prior to that fund-requiring transaction.
Expand Down Expand Up @@ -241,7 +241,7 @@ pub mod send_with_proposal {
Ok(reported_txid) => {
if txid != reported_txid {
println!(
"served txid {} does not match calulated txid {}",
"served txid {} does not match calculated txid {}",
reported_txid, txid,
);
// during darkside tests, the server may generate a new txid.
Expand Down
10 changes: 5 additions & 5 deletions zingolib/src/lightclient/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl LightClient {
let status = ConfirmationStatus::Mempool(BlockHeight::from_u32(
// The mempool transaction's height field is the height
// it entered the mempool. Making it one above that height,
// i.e. the target height, keeps this value consistant with
// i.e. the target height, keeps this value consistent with
// the transmitted height, which we record as the target height.
rtransaction.height as u32 + 1,
));
Expand Down Expand Up @@ -475,7 +475,7 @@ impl LightClient {
.read()
.await
.block_data
.handle_reorgs_and_populate_block_mangement_data(
.handle_reorgs_and_populate_block_management_data(
start_block,
end_block,
self.wallet.transactions(),
Expand Down Expand Up @@ -579,8 +579,8 @@ impl LightClient {
// 2. Notify the notes updater that the blocks are done updating
blocks_done_transmitter.send(earliest_block).unwrap();

// 3. Targetted rescan to update transactions with missing information
let targetted_rescan_handle = crate::blaze::targetted_rescan::start(
// 3. Targeted rescan to update transactions with missing information
let targeted_rescan_handle = crate::blaze::targeted_rescan::start(
self.wallet.last_100_blocks.clone(),
transaction_context,
full_transaction_fetcher_transmitter,
Expand Down Expand Up @@ -609,7 +609,7 @@ impl LightClient {
taddr_transactions_handle,
fetch_compact_blocks_handle,
fetch_full_transactions_handle,
targetted_rescan_handle,
targeted_rescan_handle,
r1,
])
.await
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/testutils/chain_generics/with_assertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub async fn to_clients_proposal(
from_inputs::propose(sender, raw_receivers).await.unwrap()
}

/// sends to any combo of recipient clients checks that each recipient also recieved the expected balances
/// sends to any combo of recipient clients checks that each recipient also received the expected balances
/// test-only generic
/// NOTICE this function bumps the chain and syncs the client
/// test_mempool can be enabled when the test harness supports it
Expand Down
2 changes: 1 addition & 1 deletion zingolib/src/testutils/fee_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ pub fn one_to_one(
GRACE_ACTIONS,
);
total_fee
.expect("actions expected to be in numberical range")
.expect("actions expected to be in numerical range")
.into_u64()
}
2 changes: 1 addition & 1 deletion zingolib/src/testutils/grpc_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl CompactTxStreamer for ProxyServer {
) -> Balance
);

/// This isn't easily definable with the macro, and I beleive it to be unused
/// This isn't easily definable with the macro, and I believe it to be unused
#[must_use]
#[allow(clippy::type_complexity, clippy::type_repetition_in_bounds)]
fn get_taddress_balance_stream<'life0, 'async_trait>(
Expand Down
4 changes: 2 additions & 2 deletions zingolib/src/testutils/lightclient.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This mod is mostly to take inputs, raw data amd comvert it into lightclient actions
//! (obvisouly) in a test environment.
//! This mod is mostly to take inputs, raw data amd convert it into lightclient actions
//! (obviously) in a test environment.
use crate::{error::ZingoLibError, lightclient::LightClient};
use zcash_client_backend::{PoolType, ShieldedProtocol};
use zcash_primitives::transaction::TxId;
Expand Down
Loading

0 comments on commit 56383d5

Please sign in to comment.