aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-12-27 15:25:51 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-12-27 15:25:51 +0000
commit9567bfeab95cc0932073641dd162903850987d43 (patch)
treeab3f4c137eec2ce5eb794a6b16a9da221f2e8216 /src/validation.cpp
parente9262ea32a6e1d364fb7974844fadc36f931f8c6 (diff)
clang-tidy: Add `performance-no-automatic-move` check
https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 33b0cf3f7a..441784a24f 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1411,7 +1411,7 @@ MempoolAcceptResult AcceptToMemoryPool(Chainstate& active_chainstate, const CTra
std::vector<COutPoint> coins_to_uncache;
auto args = MemPoolAccept::ATMPArgs::SingleAccept(chainparams, accept_time, bypass_limits, coins_to_uncache, test_accept);
- const MempoolAcceptResult result = MemPoolAccept(pool, active_chainstate).AcceptSingleTransaction(tx, args);
+ MempoolAcceptResult result = MemPoolAccept(pool, active_chainstate).AcceptSingleTransaction(tx, args);
if (result.m_result_type != MempoolAcceptResult::ResultType::VALID) {
// Remove coins that were not present in the coins cache before calling
// AcceptSingleTransaction(); this is to prevent memory DoS in case we receive a large
@@ -1436,7 +1436,7 @@ PackageMempoolAcceptResult ProcessNewPackage(Chainstate& active_chainstate, CTxM
std::vector<COutPoint> coins_to_uncache;
const CChainParams& chainparams = active_chainstate.m_chainman.GetParams();
- const auto result = [&]() EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
+ auto result = [&]() EXCLUSIVE_LOCKS_REQUIRED(cs_main) {
AssertLockHeld(cs_main);
if (test_accept) {
auto args = MemPoolAccept::ATMPArgs::PackageTestAccept(chainparams, GetTime(), coins_to_uncache);