File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,13 @@ bool PartiallySignedTransaction::Merge(const PartiallySignedTransaction& psbt)
32
32
for (unsigned int i = 0 ; i < outputs.size (); ++i) {
33
33
outputs[i].Merge (psbt.outputs [i]);
34
34
}
35
+ for (auto & xpub_pair : psbt.m_xpubs ) {
36
+ if (m_xpubs.count (xpub_pair.first ) == 0 ) {
37
+ m_xpubs[xpub_pair.first ] = xpub_pair.second ;
38
+ } else {
39
+ m_xpubs[xpub_pair.first ].insert (xpub_pair.second .begin (), xpub_pair.second .end ());
40
+ }
41
+ }
35
42
unknown.insert (psbt.unknown .begin (), psbt.unknown .end ());
36
43
37
44
return true ;
Original file line number Diff line number Diff line change @@ -1858,6 +1858,13 @@ static RPCHelpMan joinpsbts()
1858
1858
for (unsigned int i = 0 ; i < psbt.tx ->vout .size (); ++i) {
1859
1859
merged_psbt.AddOutput (psbt.tx ->vout [i], psbt.outputs [i]);
1860
1860
}
1861
+ for (auto & xpub_pair : psbt.m_xpubs ) {
1862
+ if (merged_psbt.m_xpubs .count (xpub_pair.first ) == 0 ) {
1863
+ merged_psbt.m_xpubs [xpub_pair.first ] = xpub_pair.second ;
1864
+ } else {
1865
+ merged_psbt.m_xpubs [xpub_pair.first ].insert (xpub_pair.second .begin (), xpub_pair.second .end ());
1866
+ }
1867
+ }
1861
1868
merged_psbt.unknown .insert (psbt.unknown .begin (), psbt.unknown .end ());
1862
1869
}
1863
1870
You can’t perform that action at this time.
0 commit comments