additional Antithesis probes

This commit is contained in:
Valentin Balaschenko
2026-07-10 13:38:52 +01:00
parent 0d287fd9ba
commit d013933faf
2 changed files with 13 additions and 2 deletions

View File

@@ -693,7 +693,7 @@ TaggedCache<Key, T, IsKeyCache, SharedWeakUnionPointer, SharedPointerType, Hash,
return false;
});
XRPL_ASSERT(
ALWAYS(
entry != nullptr, "xrpl::TaggedCache::fetchAndModify : entry present after canonicalize");
callback(*entry);

View File

@@ -453,8 +453,13 @@ LedgerHistory::builtLedger(
consensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
if (entry.validated && !entry.built)
{
SOMETIMES(
true, "xrpl::LedgerHistory::builtLedger : validated arrived first");
if (entry.validated.value() != hash)
{
SOMETIMES(
true,
"xrpl::LedgerHistory::builtLedger : validated-first mismatch");
JLOG(j_.error()) << "MISMATCH: seq=" << index
<< " validated:" << entry.validated.value() << " then:" << hash;
mismatch = MismatchInputs{
@@ -499,11 +504,16 @@ LedgerHistory::validatedLedger(
consensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
if (entry.built && !entry.validated)
{
SOMETIMES(
true, "xrpl::LedgerHistory::validatedLedger : built arrived first");
XRPL_ASSERT(
entry.consensus.has_value(),
"xrpl::LedgerHistory::validatedLedger : consensus set when built set");
if (entry.built.value() != hash)
{
SOMETIMES(
true,
"xrpl::LedgerHistory::validatedLedger : built-first mismatch");
JLOG(j_.error()) << "MISMATCH: seq=" << index << " built:" << entry.built.value()
<< " then:" << hash;
mismatch = MismatchInputs{
@@ -545,6 +555,7 @@ LedgerHistory::fixIndex(LedgerIndex ledgerIndex, LedgerHash const& ledgerHash)
{
if (it->second != ledgerHash)
{
SOMETIMES(true, "xrpl::LedgerHistory::fixIndex : hash repaired");
it->second = ledgerHash;
return false;
}
@@ -584,7 +595,7 @@ LedgerHistory::clearLedgerCachePrior(LedgerIndex seq)
std::erase_if(lock->byIndex, [seq](auto const& kv) { return kv.first < seq; });
indexSize = lock->byIndex.size();
XRPL_ASSERT(
ALWAYS(
lock->byIndex.empty() || lock->byIndex.begin()->first >= seq,
"xrpl::LedgerHistory::clearLedgerCachePrior : byIndex pruned to seq");
}