Skip to content

Commit

Permalink
Remove confusing P1008R1 violation in ATMPArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Feb 21, 2022
1 parent cf22191 commit facbbec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/validation.cpp
Expand Up @@ -489,6 +489,9 @@ class MemPoolAccept
*/
const bool m_package_submission;

// Must use static functions below to construct objects, NOT aggregate
// initialization.

/** Parameters for single transaction mempool validation. */
static ATMPArgs SingleAccept(const CChainParams& chainparams, int64_t accept_time,
bool bypass_limits, std::vector<COutPoint>& coins_to_uncache,
Expand Down Expand Up @@ -528,9 +531,6 @@ class MemPoolAccept
/* m_package_submission */ true,
};
}
// No default ctor to avoid exposing details to clients and allowing the possibility of
// mixing up the order of the arguments. Use static functions above instead.
ATMPArgs() = delete;
};

// Single transaction acceptance
Expand Down

0 comments on commit facbbec

Please sign in to comment.