Fix typos (#4112)
This commit is contained in:
parent
59098b355a
commit
ad971bbdd5
|
@ -635,7 +635,7 @@ proptest! {
|
|||
.await?
|
||||
.respond(response);
|
||||
|
||||
// no more requets are done
|
||||
// no more requests are done
|
||||
mempool.expect_no_requests().await?;
|
||||
state.expect_no_requests().await?;
|
||||
|
||||
|
@ -680,7 +680,7 @@ proptest! {
|
|||
let tx_unmined = UnminedTx::from(tx.clone());
|
||||
let expected_request = mempool::Request::Queue(vec![tx_unmined.clone().into()]);
|
||||
|
||||
// inser to hs we will use later
|
||||
// insert to hs we will use later
|
||||
transactions_hash_set.insert(tx_unmined.id);
|
||||
|
||||
// fail the mempool insertion
|
||||
|
@ -700,7 +700,7 @@ proptest! {
|
|||
let spacing = chrono::Duration::seconds(150);
|
||||
tokio::time::advance(spacing.to_std().unwrap()).await;
|
||||
|
||||
// the runner will made a new call to TransactionsById quering with both transactions
|
||||
// the runner will made a new call to TransactionsById querying with both transactions
|
||||
let expected_request = mempool::Request::TransactionsById(transactions_hash_set);
|
||||
let response = mempool::Response::Transactions(vec![]);
|
||||
|
||||
|
@ -731,7 +731,7 @@ proptest! {
|
|||
.respond(response);
|
||||
}
|
||||
|
||||
// no more requets are done
|
||||
// no more requests are done
|
||||
mempool.expect_no_requests().await?;
|
||||
state.expect_no_requests().await?;
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ async fn rpc_getaddresstxids_response() {
|
|||
.await
|
||||
.expect("arguments are valid so no error can happen here");
|
||||
|
||||
// TODO: The lenght of the response should be 1
|
||||
// TODO: The length of the response should be 1
|
||||
// Fix in the context of #3147
|
||||
assert_eq!(response.len(), 0);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Transaction Queue.
|
||||
//!
|
||||
//! All transactions that are sent from RPC methods should be added to this queue for retries.
|
||||
//! Transactions can fail to be inserted to the mempool inmediatly by different reasons,
|
||||
//! Transactions can fail to be inserted to the mempool immediately by different reasons,
|
||||
//! like having not mined utxos.
|
||||
//!
|
||||
//! The [`Queue`] is just an `IndexMap` of transactions with insertion date.
|
||||
|
@ -130,7 +130,7 @@ impl Runner {
|
|||
self.tip_height = height;
|
||||
}
|
||||
|
||||
/// Retry sending to memempool if needed.
|
||||
/// Retry sending to mempool if needed.
|
||||
///
|
||||
/// Creates a loop that will run each time a new block is mined.
|
||||
/// In this loop, get the transactions that are in the queue and:
|
||||
|
@ -140,7 +140,7 @@ impl Runner {
|
|||
/// - With the transactions left in the queue, retry sending them to the mempool ignoring
|
||||
/// the result of this operation.
|
||||
///
|
||||
/// Addtionally, each iteration of the above loop, will receive and insert to the queue
|
||||
/// Additionally, each iteration of the above loop, will receive and insert to the queue
|
||||
/// transactions that are pending in the channel.
|
||||
pub async fn run<Mempool, State, Tip>(
|
||||
mut self,
|
||||
|
@ -311,10 +311,10 @@ impl Runner {
|
|||
let gossip = Gossip::Tx(unmined.clone());
|
||||
let request = Request::Queue(vec![gossip]);
|
||||
|
||||
// Send to memmpool and ignore any error
|
||||
// Send to mempool and ignore any error
|
||||
let _ = mempool.clone().oneshot(request).await;
|
||||
|
||||
// retrurn what we retried but don't delete from the queue,
|
||||
// return what we retried but don't delete from the queue,
|
||||
// we might retry again in a next call.
|
||||
retried.insert(unmined.id);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ proptest! {
|
|||
// have a block interval value equal to the one at Height(1)
|
||||
let spacing = Duration::seconds(150);
|
||||
|
||||
// apply expiration inmediatly, transaction will not be removed from queue
|
||||
// apply expiration immediately, transaction will not be removed from queue
|
||||
runner.remove_expired(spacing);
|
||||
prop_assert_eq!(runner.queue.transactions().len(), 1);
|
||||
|
||||
|
@ -229,7 +229,7 @@ proptest! {
|
|||
runner.remove_committed(result);
|
||||
prop_assert_eq!(runner.queue.transactions().len(), 0);
|
||||
|
||||
// no more requets expected
|
||||
// no more requests expected
|
||||
mempool.expect_no_requests().await?;
|
||||
|
||||
Ok::<_, TestCaseError>(())
|
||||
|
|
|
@ -206,7 +206,7 @@ impl TransparentTransfers {
|
|||
}
|
||||
|
||||
/// Returns the [`transaction::Hash`]es of the transactions that
|
||||
/// sent or received transparent tranfers to this address,
|
||||
/// sent or received transparent transfers to this address,
|
||||
/// in this partial chain, in chain order.
|
||||
///
|
||||
/// `chain_tx_by_hash` should be the `tx_by_hash` field from the [`Chain`] containing this index.
|
||||
|
|
|
@ -103,7 +103,7 @@ pub(crate) fn transparent_balance(
|
|||
) -> Result<Amount<NonNegative>, BoxError> {
|
||||
let mut balance_result = finalized_transparent_balance(db, &addresses);
|
||||
|
||||
// Retry the finalized balance query if it was interruped by a finalizing block
|
||||
// Retry the finalized balance query if it was interrupted by a finalizing block
|
||||
for _ in 0..FINALIZED_ADDRESS_INDEX_RETRIES {
|
||||
if balance_result.is_ok() {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue