Skip to content

Commit

Permalink
merge bitcoin#24404: Remove confusing P1008R1 violation in ATMPArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Dec 20, 2024
1 parent 006370d commit 8e42b12
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,24 @@ class MemPoolAccept
/* m_package_submission */ true,
};
}
// No default ctor to avoid exposing details to clients and allowing the possibility of

private:
// Private 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;
ATMPArgs(const CChainParams& chainparams,
int64_t accept_time,
bool bypass_limits,
std::vector<COutPoint>& coins_to_uncache,
bool test_accept,
bool package_submission)
: 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_package_submission{package_submission}
{
}
};

// Single transaction acceptance
Expand Down

0 comments on commit 8e42b12

Please sign in to comment.