mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
psbt: add PSBTv2 global tx fields
When decomposing a transaction into a PSBTv2, the tx version and locktime need to be stored in their respective global fields. Add those fields and fill them when constructing.
This commit is contained in:
@@ -16,6 +16,8 @@ using common::PSBTError;
|
||||
|
||||
PartiallySignedTransaction::PartiallySignedTransaction(const CMutableTransaction& tx) : tx(tx)
|
||||
{
|
||||
tx_version = tx.version;
|
||||
fallback_locktime = tx.nLockTime;
|
||||
inputs.reserve(tx.vin.size());
|
||||
for (const CTxIn& input : tx.vin) {
|
||||
inputs.emplace_back(GetVersion(), input.prevout.hash, input.prevout.n, input.nSequence);
|
||||
|
||||
Reference in New Issue
Block a user