aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/spend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/spend.cpp')
-rw-r--r--src/wallet/spend.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp
index 2322471402..7b86ad388d 100644
--- a/src/wallet/spend.cpp
+++ b/src/wallet/spend.cpp
@@ -132,7 +132,7 @@ static std::optional<int64_t> GetSignedTxinWeight(const CWallet* wallet, const C
// txouts needs to be in the order of tx.vin
TxSize CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, const std::vector<CTxOut>& txouts, const CCoinControl* coin_control)
{
- // nVersion + nLockTime + input count + output count
+ // version + nLockTime + input count + output count
int64_t weight = (4 + 4 + GetSizeOfCompactSize(tx.vin.size()) + GetSizeOfCompactSize(tx.vout.size())) * WITNESS_SCALE_FACTOR;
// Whether any input spends a witness program. Necessary to run before the next loop over the
// inputs in order to accurately compute the compactSize length for the witness data per input.
@@ -985,7 +985,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
CMutableTransaction txNew; // The resulting transaction that we make
if (coin_control.m_version) {
- txNew.nVersion = coin_control.m_version.value();
+ txNew.version = coin_control.m_version.value();
}
CoinSelectionParams coin_selection_params{rng_fast}; // Parameters for coin selection, init with dummy
@@ -1084,7 +1084,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
const auto change_spend_fee = coin_selection_params.m_discard_feerate.GetFee(coin_selection_params.change_spend_size);
coin_selection_params.min_viable_change = std::max(change_spend_fee + 1, dust);
- // Static vsize overhead + outputs vsize. 4 nVersion, 4 nLocktime, 1 input count, 1 witness overhead (dummy, flag, stack size)
+ // Static vsize overhead + outputs vsize. 4 version, 4 nLocktime, 1 input count, 1 witness overhead (dummy, flag, stack size)
coin_selection_params.tx_noinputs_size = 10 + GetSizeOfCompactSize(vecSend.size()); // bytes for output count
// vouts to the payees
@@ -1394,7 +1394,7 @@ util::Result<CreatedTransactionResult> FundTransaction(CWallet& wallet, const CM
coinControl.m_locktime = tx.nLockTime;
// Set the user desired version
- coinControl.m_version = tx.nVersion;
+ coinControl.m_version = tx.version;
// Acquire the locks to prevent races to the new locked unspents between the
// CreateTransaction call and LockCoin calls (when lockUnspents is true).