Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlinjin committed Mar 31, 2024
1 parent 2e26aa5 commit 4d0ae4c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/coin_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ impl<'a> CoinSelector<'a> {

/// Current weight of transaction implied by the selection.
///
/// If you don't have any drain outputs (only target outputs) just set drain_weights tio [`DrainWeights::NONE`].
/// If you don't have any drain outputs (only target outputs) just set drain_weights to
/// [`DrainWeights::NONE`].
pub fn weight(&self, target_ouputs: TargetOutputs, drain_weight: DrainWeights) -> u32 {
TX_FIXED_FIELD_WEIGHT
+ self.input_weight()
Expand Down
2 changes: 1 addition & 1 deletion src/drain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Drain {
/// adding this outupt(s).
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct ChangePolicy {
/// The minimum amount of excesss there needs to be add a change output.
/// The minimum amount of excess there needs to be add a change output.
pub min_value: u64,
/// The weights of the drain that would be added according to the policy.
pub drain_weights: DrainWeights,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub const TX_FIXED_FIELD_WEIGHT: u32 = (4 /* nVersion */ + 4/* nLockTime */) * 4
/// The weight of a taproot keyspend witness
pub const TR_KEYSPEND_SATISFACTION_WEIGHT: u32 = 1 /*witness_len*/ + 1 /*item len*/ + 64 /*signature*/;

/// The weight of a segwit `v1` (taproot) script pubkey in an outupt. This does not include the weight of
/// The weight of a segwit `v1` (taproot) script pubkey in an output. This does not include the weight of
/// the `TxOut` itself or the script pubkey length field.
pub const TR_SPK_WEIGHT: u32 = (1 + 1 + 32) * 4; // version + push + key

Expand Down
2 changes: 1 addition & 1 deletion src/metrics/lowest_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl BnbMetric for LowestFee {
if ev < -0.0 {
let value_per_negative_effective_value =
low_sats_per_wu_candidate.value as f32 / ev.abs();
// this is how much abosolute value we have to add to cancel out the excess
// this is how much absolute value we have to add to cancel out the excess
let extra_value_needed_to_get_rid_of_change = amount_above_change_threshold
as f32
* value_per_negative_effective_value;
Expand Down

0 comments on commit 4d0ae4c

Please sign in to comment.