mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Use GetUnsignedTx when serializing in PSBTv0
If we are asked to make a PSBTv0, we may not necessarily have made an unsigned transaction. So instead use GetUnsignedTx which will either fetch one that already exists, or construct a new one from the stored data. Internally we may be storing a PSBTv0 like a PSBTv2, but still want to serialize those as v0.
This commit is contained in:
parent
2bcb9d07b2
commit
00a49ca94e
1 changed files with 1 additions and 1 deletions
|
@ -1345,7 +1345,7 @@ struct PartiallySignedTransaction
|
|||
SerializeToVector(s, CompactSizeWriter(PSBT_GLOBAL_UNSIGNED_TX));
|
||||
|
||||
// Write serialized tx to a stream
|
||||
SerializeToVector(s, TX_NO_WITNESS(*tx));
|
||||
SerializeToVector(s, TX_NO_WITNESS(GetUnsignedTx()));
|
||||
}
|
||||
|
||||
// Write xpubs
|
||||
|
|
Loading…
Add table
Reference in a new issue