mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-02 19:19:41 +01:00
doc: fix invalid arg name hints for bugprone validation
The extra leading `=` or missing trailing `=` prevented clang-tidy's `bugprone-argument-comment` check from validating the parameter name, as it only matches comments formatted strictly as `/*arg=*/` (see https://clang.llvm.org/extra/clang-tidy/checks/bugprone/argument-comment.html).
This commit is contained in:
@@ -484,63 +484,63 @@ public:
|
||||
static ATMPArgs SingleAccept(const CChainParams& chainparams, int64_t accept_time,
|
||||
bool bypass_limits, std::vector<COutPoint>& coins_to_uncache,
|
||||
bool test_accept) {
|
||||
return ATMPArgs{/* m_chainparams */ chainparams,
|
||||
/* m_accept_time */ accept_time,
|
||||
/* m_bypass_limits */ bypass_limits,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ test_accept,
|
||||
/* m_allow_replacement */ true,
|
||||
/* m_allow_sibling_eviction */ true,
|
||||
/* m_package_submission */ false,
|
||||
/* m_package_feerates */ false,
|
||||
/* m_client_maxfeerate */ {}, // checked by caller
|
||||
return ATMPArgs{/*chainparams=*/ chainparams,
|
||||
/*accept_time=*/ accept_time,
|
||||
/*bypass_limits=*/ bypass_limits,
|
||||
/*coins_to_uncache=*/ coins_to_uncache,
|
||||
/*test_accept=*/ test_accept,
|
||||
/*allow_replacement=*/ true,
|
||||
/*allow_sibling_eviction=*/ true,
|
||||
/*package_submission=*/ false,
|
||||
/*package_feerates=*/ false,
|
||||
/*client_maxfeerate=*/ {}, // checked by caller
|
||||
};
|
||||
}
|
||||
|
||||
/** Parameters for test package mempool validation through testmempoolaccept. */
|
||||
static ATMPArgs PackageTestAccept(const CChainParams& chainparams, int64_t accept_time,
|
||||
std::vector<COutPoint>& coins_to_uncache) {
|
||||
return ATMPArgs{/* m_chainparams */ chainparams,
|
||||
/* m_accept_time */ accept_time,
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ true,
|
||||
/* m_allow_replacement */ false,
|
||||
/* m_allow_sibling_eviction */ false,
|
||||
/* m_package_submission */ false, // not submitting to mempool
|
||||
/* m_package_feerates */ false,
|
||||
/* m_client_maxfeerate */ {}, // checked by caller
|
||||
return ATMPArgs{/*chainparams=*/ chainparams,
|
||||
/*accept_time=*/ accept_time,
|
||||
/*bypass_limits=*/ false,
|
||||
/*coins_to_uncache=*/ coins_to_uncache,
|
||||
/*test_accept=*/ true,
|
||||
/*allow_replacement=*/ false,
|
||||
/*allow_sibling_eviction=*/ false,
|
||||
/*package_submission=*/ false, // not submitting to mempool
|
||||
/*package_feerates=*/ false,
|
||||
/*client_maxfeerate=*/ {}, // checked by caller
|
||||
};
|
||||
}
|
||||
|
||||
/** Parameters for child-with-parents package validation. */
|
||||
static ATMPArgs PackageChildWithParents(const CChainParams& chainparams, int64_t accept_time,
|
||||
std::vector<COutPoint>& coins_to_uncache, const std::optional<CFeeRate>& client_maxfeerate) {
|
||||
return ATMPArgs{/* m_chainparams */ chainparams,
|
||||
/* m_accept_time */ accept_time,
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ false,
|
||||
/* m_allow_replacement */ true,
|
||||
/* m_allow_sibling_eviction */ false,
|
||||
/* m_package_submission */ true,
|
||||
/* m_package_feerates */ true,
|
||||
/* m_client_maxfeerate */ client_maxfeerate,
|
||||
return ATMPArgs{/*chainparams=*/ chainparams,
|
||||
/*accept_time=*/ accept_time,
|
||||
/*bypass_limits=*/ false,
|
||||
/*coins_to_uncache=*/ coins_to_uncache,
|
||||
/*test_accept=*/ false,
|
||||
/*allow_replacement=*/ true,
|
||||
/*allow_sibling_eviction=*/ false,
|
||||
/*package_submission=*/ true,
|
||||
/*package_feerates=*/ true,
|
||||
/*client_maxfeerate=*/ client_maxfeerate,
|
||||
};
|
||||
}
|
||||
|
||||
/** Parameters for a single transaction within a package. */
|
||||
static ATMPArgs SingleInPackageAccept(const ATMPArgs& package_args) {
|
||||
return ATMPArgs{/* m_chainparams */ package_args.m_chainparams,
|
||||
/* m_accept_time */ package_args.m_accept_time,
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ package_args.m_coins_to_uncache,
|
||||
/* m_test_accept */ package_args.m_test_accept,
|
||||
/* m_allow_replacement */ true,
|
||||
/* m_allow_sibling_eviction */ true,
|
||||
/* m_package_submission */ true, // trim at the end of AcceptPackage()
|
||||
/* m_package_feerates */ false, // only 1 transaction
|
||||
/* m_client_maxfeerate */ package_args.m_client_maxfeerate,
|
||||
return ATMPArgs{/*chainparams=*/ package_args.m_chainparams,
|
||||
/*accept_time=*/ package_args.m_accept_time,
|
||||
/*bypass_limits=*/ false,
|
||||
/*coins_to_uncache=*/ package_args.m_coins_to_uncache,
|
||||
/*test_accept=*/ package_args.m_test_accept,
|
||||
/*allow_replacement=*/ true,
|
||||
/*allow_sibling_eviction=*/ true,
|
||||
/*package_submission=*/ true, // trim at the end of AcceptPackage()
|
||||
/*package_feerates=*/ false, // only 1 transaction
|
||||
/*client_maxfeerate=*/ package_args.m_client_maxfeerate,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user