mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix Replace assert with XRPL_ASSERT (#5312)
This commit is contained in:
@@ -226,7 +226,10 @@ public:
|
||||
toBase58(TokenType::NodePublic, votes.first);
|
||||
if (!votes.second.timeout)
|
||||
{
|
||||
assert(votes.second.upVotes.empty());
|
||||
XRPL_ASSERT(
|
||||
votes.second.upVotes.empty(),
|
||||
"ripple::TrustedVotes::recordVotes : received no "
|
||||
"upvotes");
|
||||
JLOG(j.debug())
|
||||
<< "recordVotes: Have not received any "
|
||||
"amendment votes from "
|
||||
@@ -242,7 +245,10 @@ public:
|
||||
}
|
||||
else if (votes.second.timeout != newTimeout)
|
||||
{
|
||||
assert(votes.second.timeout < newTimeout);
|
||||
XRPL_ASSERT(
|
||||
votes.second.timeout < newTimeout,
|
||||
"ripple::TrustedVotes::recordVotes : votes not "
|
||||
"expired");
|
||||
using namespace std::chrono;
|
||||
auto const age = duration_cast<minutes>(
|
||||
newTimeout - *votes.second.timeout);
|
||||
@@ -262,9 +268,10 @@ public:
|
||||
int available = 0;
|
||||
for (auto& validatorVotes : recordedVotes_)
|
||||
{
|
||||
assert(
|
||||
XRPL_ASSERT(
|
||||
validatorVotes.second.timeout ||
|
||||
validatorVotes.second.upVotes.empty());
|
||||
validatorVotes.second.upVotes.empty(),
|
||||
"ripple::TrustedVotes::getVotes : valid votes");
|
||||
if (validatorVotes.second.timeout)
|
||||
++available;
|
||||
for (uint256 const& amendment : validatorVotes.second.upVotes)
|
||||
|
||||
@@ -1245,7 +1245,7 @@ PeerImp::handleTransaction(
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
eraseTxQueue != batch,
|
||||
("ripple::PeerImp::handleTransaction correct function params"));
|
||||
("ripple::PeerImp::handleTransaction : valid inputs"));
|
||||
if (tracking_.load() == Tracking::diverged)
|
||||
return;
|
||||
|
||||
|
||||
@@ -154,7 +154,8 @@ private:
|
||||
update(Resource::Charge f, std::string const& add)
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
f >= fee, "ripple::PeerImp::ChargeWithContext fee increases");
|
||||
f >= fee,
|
||||
"ripple::PeerImp::ChargeWithContext::update : fee increases");
|
||||
fee = f;
|
||||
if (!context.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user