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)
3232 for (unsigned int i = 0 ; i < outputs.size (); ++i) {
3333 outputs[i].Merge (psbt.outputs [i]);
3434 }
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+ }
3542 unknown.insert (psbt.unknown .begin (), psbt.unknown .end ());
3643
3744 return true ;
Original file line number Diff line number Diff line change @@ -1858,6 +1858,13 @@ static RPCHelpMan joinpsbts()
18581858 for (unsigned int i = 0 ; i < psbt.tx ->vout .size (); ++i) {
18591859 merged_psbt.AddOutput (psbt.tx ->vout [i], psbt.outputs [i]);
18601860 }
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+ }
18611868 merged_psbt.unknown .insert (psbt.unknown .begin (), psbt.unknown .end ());
18621869 }
18631870
You can’t perform that action at this time.
0 commit comments