mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-17 11:07:00 +02:00
refactor: Rename CTransaction::nVersion to version
In order to ensure that the change of nVersion to a uint32_t in the previous commit has no effect, rename nVersion to version in this commit so that reviewers can easily spot if a spot was missed or if there is a check somewhere whose semantics have changed.
This commit is contained in:
@@ -1748,8 +1748,8 @@ static RPCHelpMan joinpsbts()
|
||||
}
|
||||
psbtxs.push_back(psbtx);
|
||||
// Choose the highest version number
|
||||
if (psbtx.tx->nVersion > best_version) {
|
||||
best_version = psbtx.tx->nVersion;
|
||||
if (psbtx.tx->version > best_version) {
|
||||
best_version = psbtx.tx->version;
|
||||
}
|
||||
// Choose the lowest lock time
|
||||
if (psbtx.tx->nLockTime < best_locktime) {
|
||||
@@ -1760,7 +1760,7 @@ static RPCHelpMan joinpsbts()
|
||||
// Create a blank psbt where everything will be added
|
||||
PartiallySignedTransaction merged_psbt;
|
||||
merged_psbt.tx = CMutableTransaction();
|
||||
merged_psbt.tx->nVersion = best_version;
|
||||
merged_psbt.tx->version = best_version;
|
||||
merged_psbt.tx->nLockTime = best_locktime;
|
||||
|
||||
// Merge
|
||||
@@ -1795,7 +1795,7 @@ static RPCHelpMan joinpsbts()
|
||||
|
||||
PartiallySignedTransaction shuffled_psbt;
|
||||
shuffled_psbt.tx = CMutableTransaction();
|
||||
shuffled_psbt.tx->nVersion = merged_psbt.tx->nVersion;
|
||||
shuffled_psbt.tx->version = merged_psbt.tx->version;
|
||||
shuffled_psbt.tx->nLockTime = merged_psbt.tx->nLockTime;
|
||||
for (int i : input_indices) {
|
||||
shuffled_psbt.AddInput(merged_psbt.tx->vin[i], merged_psbt.inputs[i]);
|
||||
|
||||
Reference in New Issue
Block a user