Skip to content

Commit

Permalink
rbf: use largest change output for change index
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Nov 23, 2023
1 parent 8ee4112 commit a1e8128
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,9 @@ impl DaemonControl {
let destinations: HashMap<bitcoin::Address, bitcoin::Amount> = prev_derivs
.iter()
.filter_map(|(addr, amt, deriv)| match deriv {
Some((ind, true)) if *ind == change_index.expect("change_index is some here") => None,
Some((ind, true)) if *ind == change_index.expect("change_index is some here") => {
None
}
_ => Some((addr.clone(), *amt)),
})
.collect();
Expand Down

0 comments on commit a1e8128

Please sign in to comment.