Skip to content

Commit

Permalink
psbt: fix output sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Dec 27, 2023
1 parent 93b663f commit af43c11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions psbt/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,9 @@ impl Psbt {
}

self.outputs.sort_by_key(f);
for (index, output) in self.outputs.iter_mut().enumerate() {
output.index = index;
}

Ok(())
}
Expand Down

0 comments on commit af43c11

Please sign in to comment.