Correct a couple years of accumulated typos

This commit is contained in:
Luke Parker
2023-12-17 02:06:51 -05:00
parent 9c3329abeb
commit c2fffb9887
40 changed files with 63 additions and 63 deletions

View File

@@ -306,7 +306,7 @@ impl_from!(substrate, ProcessorMessage, Substrate);
// Intent generation code
const COORDINATOR_UID: u8 = 0;
const PROCESSSOR_UID: u8 = 1;
const PROCESSOR_UID: u8 = 1;
const TYPE_KEY_GEN_UID: u8 = 2;
const TYPE_SIGN_UID: u8 = 3;
@@ -401,7 +401,7 @@ impl ProcessorMessage {
key_gen::ProcessorMessage::Blame { id, .. } => (5, id),
};
let mut res = vec![PROCESSSOR_UID, TYPE_KEY_GEN_UID, sub];
let mut res = vec![PROCESSOR_UID, TYPE_KEY_GEN_UID, sub];
res.extend(&id.encode());
res
}
@@ -415,7 +415,7 @@ impl ProcessorMessage {
sign::ProcessorMessage::Completed { id, .. } => (3, id.to_vec()),
};
let mut res = vec![PROCESSSOR_UID, TYPE_SIGN_UID, sub];
let mut res = vec![PROCESSOR_UID, TYPE_SIGN_UID, sub];
res.extend(&id);
res
}
@@ -430,7 +430,7 @@ impl ProcessorMessage {
coordinator::ProcessorMessage::CosignedBlock { block, .. } => (5, block.encode()),
};
let mut res = vec![PROCESSSOR_UID, TYPE_COORDINATOR_UID, sub];
let mut res = vec![PROCESSOR_UID, TYPE_COORDINATOR_UID, sub];
res.extend(&id);
res
}
@@ -443,7 +443,7 @@ impl ProcessorMessage {
}
};
let mut res = vec![PROCESSSOR_UID, TYPE_SUBSTRATE_UID, sub];
let mut res = vec![PROCESSOR_UID, TYPE_SUBSTRATE_UID, sub];
res.extend(&id);
res
}

View File

@@ -572,7 +572,7 @@ impl<N: Network, D: Db> KeyGen<N, D> {
.unwrap()
.blame(accuser, accused, network_share, network_blame);
// If thw accused was blamed for either, mark them as at fault
// If the accused was blamed for either, mark them as at fault
if (substrate_blame == accused) || (network_blame == accused) {
return ProcessorMessage::Blame { id, participant: accused };
}

View File

@@ -547,7 +547,7 @@ impl<N: Network, D: Db> Scanner<N, D> {
let key_vec = key.to_bytes().as_ref().to_vec();
// TODO: These lines are the ones which will cause a really long-lived lock acquisiton
// TODO: These lines are the ones which will cause a really long-lived lock acquisition
for output in network.get_outputs(&block, key).await {
assert_eq!(output.key(), key);
if output.balance().amount.0 >= N::DUST {

View File

@@ -18,7 +18,7 @@ pub struct Scheduler<N: Network> {
key: <N::Curve as Ciphersuite>::G,
coin: Coin,
// Serai, when it has more outputs expected than it can handle in a single tranaction, will
// Serai, when it has more outputs expected than it can handle in a single transaction, will
// schedule the outputs to be handled later. Immediately, it just creates additional outputs
// which will eventually handle those outputs
//
@@ -321,7 +321,7 @@ impl<N: Network> Scheduler<N> {
// If we don't have UTXOs available, don't try to continue
if self.utxos.is_empty() {
log::info!("no utxos currently avilable");
log::info!("no utxos currently available");
return plans;
}

View File

@@ -507,14 +507,14 @@ impl Network for Bitcoin {
// The output should be ~36 bytes, or 144 weight units
// The overhead should be ~20 bytes at most, or 80 weight units
// 684 weight units, 171 vbytes, round up to 200
// 200 vbytes at 1 sat/weight (our current minumum fee, 4 sat/vbyte) = 800 sat fee for the
// 200 vbytes at 1 sat/weight (our current minimum fee, 4 sat/vbyte) = 800 sat fee for the
// aggregation TX
const COST_TO_AGGREGATE: u64 = 800;
// Bitcoin has a max weight of 400,000 (MAX_STANDARD_TX_WEIGHT)
// A non-SegWit TX will have 4 weight units per byte, leaving a max size of 100,000 bytes
// While our inputs are entirely SegWit, such fine tuning is not necessary and could create
// issues in the future (if the size decreases or we mis-evaluate it)
// issues in the future (if the size decreases or we misevaluate it)
// It also offers a minimal amount of benefit when we are able to logarithmically accumulate
// inputs
// For 128-byte inputs (36-byte output specification, 64-byte signature, whatever overhead) and

View File

@@ -77,7 +77,7 @@ impl<N: Network> Payment<N> {
pub struct Plan<N: Network> {
pub key: <N::Curve as Ciphersuite>::G,
pub inputs: Vec<N::Output>,
/// The payments this Plan is inteded to create.
/// The payments this Plan is intended to create.
///
/// This should only contain payments leaving Serai. While it is acceptable for users to enter
/// Serai's address(es) as the payment address, as that'll be handled by anything which expects
@@ -152,7 +152,7 @@ impl<N: Network> Plan<N> {
let change = if let Some(change) = &self.change {
change.clone().try_into().map_err(|_| {
io::Error::other(format!(
"an address we said to use as change couldn't be convered to a Vec<u8>: {}",
"an address we said to use as change couldn't be converted to a Vec<u8>: {}",
change.to_string(),
))
})?

View File

@@ -142,7 +142,7 @@ pub async fn test_no_deadlock_in_multisig_completed<N: Network>(network: N) {
}
};
// The ack_block acquisiton shows the Scanner isn't maintaining the lock on its own thread after
// The ack_block acquisition shows the Scanner isn't maintaining the lock on its own thread after
// emitting the Block event
// TODO: This is incomplete. Also test after emitting Completed
let mut txn = db.txn();