@@ -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 == 3 ) {
69+ if (ptx->nVersion == 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" ,
@@ -107,7 +107,7 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v
107107 }();
108108
109109 // If there is a parent, it must have the right version.
110- if (parent_info.m_version != 3 ) {
110+ if (parent_info.m_version != TRUC_VERSION ) {
111111 return strprintf (" v3 tx %s (wtxid=%s) cannot spend from non-v3 tx %s (wtxid=%s)" ,
112112 ptx->GetHash ().ToString (), ptx->GetWitnessHash ().ToString (),
113113 parent_info.m_txid .ToString (), parent_info.m_wtxid .ToString ());
@@ -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 == 3 ) {
149+ if (it->GetTx ().nVersion == 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 == 3 ) {
156+ if (package.at (index)->nVersion == 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 != 3 && entry->GetTx ().nVersion == 3 ) {
175+ if (ptx->nVersion != TRUC_VERSION && entry->GetTx ().nVersion == 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 == 3 && entry->GetTx ().nVersion != 3 ) {
180+ } else if (ptx->nVersion == TRUC_VERSION && entry->GetTx ().nVersion != 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 ()),
@@ -190,7 +190,7 @@ std::optional<std::pair<std::string, CTransactionRef>> SingleV3Checks(const CTra
190190 static_assert (V3_DESCENDANT_LIMIT == 2 );
191191
192192 // The rest of the rules only apply to transactions with nVersion=3.
193- if (ptx->nVersion != 3 ) return std::nullopt ;
193+ if (ptx->nVersion != 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