Skip to content

Commit

Permalink
Delete unused
Browse files Browse the repository at this point in the history
  • Loading branch information
spacebear21 committed Sep 26, 2024
1 parent f5302e8 commit 43b5850
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 97 deletions.
2 changes: 0 additions & 2 deletions payjoin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ mod request;
pub use request::*;

mod uri;
#[cfg(any(feature = "send", feature = "receive"))]
pub(crate) mod weight;

#[cfg(feature = "base64")]
pub use bitcoin::base64;
Expand Down
25 changes: 0 additions & 25 deletions payjoin/src/output_type.rs

This file was deleted.

17 changes: 0 additions & 17 deletions payjoin/src/psbt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pub(crate) trait PsbtExt: Sized {
/// thing for outputs.
fn validate(self) -> Result<Self, InconsistentPsbt>;
fn validate_input_utxos(&self, treat_missing_as_error: bool) -> Result<(), PsbtInputsError>;
fn calculate_fee(&self) -> bitcoin::Amount;
}

impl PsbtExt for Psbt {
Expand Down Expand Up @@ -89,22 +88,6 @@ impl PsbtExt for Psbt {
.map_err(|error| PsbtInputsError { index, error })
})
}

fn calculate_fee(&self) -> bitcoin::Amount {
let mut total_outputs = bitcoin::Amount::ZERO;
let mut total_inputs = bitcoin::Amount::ZERO;

for output in &self.unsigned_tx.output {
total_outputs += output.value;
}

for input in self.input_pairs() {
total_inputs += input.previous_txout().unwrap().value;
}
log::debug!(" total_inputs: {}", total_inputs);
log::debug!("- total_outputs: {}", total_outputs);
total_inputs - total_outputs
}
}

pub(crate) struct InputPair<'a> {
Expand Down
53 changes: 0 additions & 53 deletions payjoin/src/weight.rs

This file was deleted.

0 comments on commit 43b5850

Please sign in to comment.