@@ -43,13 +43,13 @@ struct ParentInfo {
4343 const Txid& m_txid;
4444 /* * Wtxid used for debug string */
4545 const Wtxid& m_wtxid;
46- /* * nVersion used to check inheritance of v3 and non-v3 */
47- decltype (CTransaction::nVersion ) m_version;
46+ /* * version used to check inheritance of v3 and non-v3 */
47+ decltype (CTransaction::version ) m_version;
4848 /* * If parent is in mempool, whether it has any descendants in mempool. */
4949 bool m_has_mempool_descendant;
5050
5151 ParentInfo () = delete ;
52- ParentInfo (const Txid& txid, const Wtxid& wtxid, decltype (CTransaction::nVersion ) version, bool has_mempool_descendant) :
52+ ParentInfo (const Txid& txid, const Wtxid& wtxid, decltype (CTransaction::version ) version, bool has_mempool_descendant) :
5353 m_txid{txid}, m_wtxid{wtxid}, m_version{version},
5454 m_has_mempool_descendant{has_mempool_descendant}
5555 {}
@@ -66,7 +66,7 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v
6666 const auto in_package_parents{FindInPackageParents (package, ptx)};
6767
6868 // Now we have all ancestors, so we can start checking v3 rules.
69- if (ptx->nVersion == TRUC_VERSION) {
69+ if (ptx->version == TRUC_VERSION) {
7070 // SingleV3Checks should have checked this already.
7171 if (!Assume (vsize <= V3_MAX_VSIZE)) {
7272 return strprintf (" v3 tx %s (wtxid=%s) is too big: %u > %u virtual bytes" ,
@@ -94,14 +94,14 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v
9494 Assume (mempool_parent->GetCountWithDescendants () == 1 );
9595 return ParentInfo{mempool_parent->GetTx ().GetHash (),
9696 mempool_parent->GetTx ().GetWitnessHash (),
97- mempool_parent->GetTx ().nVersion ,
97+ mempool_parent->GetTx ().version ,
9898 /* has_mempool_descendant=*/ mempool_parent->GetCountWithDescendants () > 1 };
9999 } else {
100100 auto & parent_index = in_package_parents.front ();
101101 auto & package_parent = package.at (parent_index);
102102 return ParentInfo{package_parent->GetHash (),
103103 package_parent->GetWitnessHash (),
104- package_parent->nVersion ,
104+ package_parent->version ,
105105 /* has_mempool_descendant=*/ false };
106106 }
107107 }();
@@ -146,14 +146,14 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v
146146 } else {
147147 // Non-v3 transactions cannot have v3 parents.
148148 for (auto it : mempool_ancestors) {
149- if (it->GetTx ().nVersion == TRUC_VERSION) {
149+ if (it->GetTx ().version == TRUC_VERSION) {
150150 return strprintf (" non-v3 tx %s (wtxid=%s) cannot spend from v3 tx %s (wtxid=%s)" ,
151151 ptx->GetHash ().ToString (), ptx->GetWitnessHash ().ToString (),
152152 it->GetSharedTx ()->GetHash ().ToString (), it->GetSharedTx ()->GetWitnessHash ().ToString ());
153153 }
154154 }
155155 for (const auto & index: in_package_parents) {
156- if (package.at (index)->nVersion == TRUC_VERSION) {
156+ if (package.at (index)->version == TRUC_VERSION) {
157157 return strprintf (" non-v3 tx %s (wtxid=%s) cannot spend from v3 tx %s (wtxid=%s)" ,
158158 ptx->GetHash ().ToString (),
159159 ptx->GetWitnessHash ().ToString (),
@@ -172,12 +172,12 @@ std::optional<std::pair<std::string, CTransactionRef>> SingleV3Checks(const CTra
172172{
173173 // Check v3 and non-v3 inheritance.
174174 for (const auto & entry : mempool_ancestors) {
175- if (ptx->nVersion != TRUC_VERSION && entry->GetTx ().nVersion == TRUC_VERSION) {
175+ if (ptx->version != TRUC_VERSION && entry->GetTx ().version == TRUC_VERSION) {
176176 return std::make_pair (strprintf (" non-v3 tx %s (wtxid=%s) cannot spend from v3 tx %s (wtxid=%s)" ,
177177 ptx->GetHash ().ToString (), ptx->GetWitnessHash ().ToString (),
178178 entry->GetSharedTx ()->GetHash ().ToString (), entry->GetSharedTx ()->GetWitnessHash ().ToString ()),
179179 nullptr );
180- } else if (ptx->nVersion == TRUC_VERSION && entry->GetTx ().nVersion != TRUC_VERSION) {
180+ } else if (ptx->version == TRUC_VERSION && entry->GetTx ().version != TRUC_VERSION) {
181181 return std::make_pair (strprintf (" v3 tx %s (wtxid=%s) cannot spend from non-v3 tx %s (wtxid=%s)" ,
182182 ptx->GetHash ().ToString (), ptx->GetWitnessHash ().ToString (),
183183 entry->GetSharedTx ()->GetHash ().ToString (), entry->GetSharedTx ()->GetWitnessHash ().ToString ()),
@@ -189,8 +189,8 @@ std::optional<std::pair<std::string, CTransactionRef>> SingleV3Checks(const CTra
189189 static_assert (V3_ANCESTOR_LIMIT == 2 );
190190 static_assert (V3_DESCENDANT_LIMIT == 2 );
191191
192- // The rest of the rules only apply to transactions with nVersion =3.
193- if (ptx->nVersion != TRUC_VERSION) return std::nullopt ;
192+ // The rest of the rules only apply to transactions with version =3.
193+ if (ptx->version != TRUC_VERSION) return std::nullopt ;
194194
195195 if (vsize > V3_MAX_VSIZE) {
196196 return std::make_pair (strprintf (" v3 tx %s (wtxid=%s) is too big: %u > %u virtual bytes" ,
0 commit comments