We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
tap_key_origins
1 parent 1bbd13b commit 9a57e00Copy full SHA for 9a57e00
src/psbt/mod.rs
@@ -1234,6 +1234,14 @@ fn update_item_with_descriptor_helper<F: PsbtFields>(
1234
}
1235
1236
1237
+ // Ensure there are no duplicated leaf hashes. This can happen if some of them were
1238
+ // already present in the map when this function is called, since this only appends new
1239
+ // data to the psbt without checking what's already present.
1240
+ for (tapleaf_hashes, _) in item.tap_key_origins().values_mut() {
1241
+ tapleaf_hashes.sort();
1242
+ tapleaf_hashes.dedup();
1243
+ }
1244
+
1245
match item.tap_tree() {
1246
// Only set the tap_tree if the item supports it (it's an output) and the descriptor actually
1247
// contains one, otherwise it'll just be empty
0 commit comments