mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02: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
e860cd0f42
commit
ecaf5ea1cf
1 changed files with 1 additions and 1 deletions
|
|
@ -761,7 +761,7 @@ struct PartiallySignedTransaction
|
|||
|
||||
// Write serialized tx to a stream
|
||||
OverrideStream<Stream> os(&s, s.GetType(), s.GetVersion() | SERIALIZE_TRANSACTION_NO_WITNESS);
|
||||
SerializeToVector(os, *tx);
|
||||
SerializeToVector(os, GetUnsignedTx());
|
||||
}
|
||||
|
||||
// Write xpubs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue