Skip to content

Commit

Permalink
add reset_outputs fn to tx builder (#33)
Browse files Browse the repository at this point in the history
* add remove_output fn to tx builder

* write simple reset outputs fn
  • Loading branch information
baymac authored Mar 7, 2024
1 parent d4e55cd commit 9303292
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/src/tx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,12 @@ impl TransactionBuilder {
self.inputs = inputs.clone();
}

pub fn reset_outputs(&mut self) -> TransactionOutputs {
let prev_outputs = self.outputs.clone();
self.outputs = TransactionOutputs::new();
prev_outputs
}

pub fn set_collateral(&mut self, collateral: &TxInputsBuilder) {
self.collateral = collateral.clone();
}
Expand Down

0 comments on commit 9303292

Please sign in to comment.