AI review feedback: variable initialization, comments, headers

This commit is contained in:
Ed Hennis
2026-07-02 18:58:44 -04:00
parent 4644347d21
commit bd2f5dbd35
3 changed files with 11 additions and 5 deletions

View File

@@ -671,6 +671,9 @@ public:
{
std::this_thread::sleep_for(100ms);
}
// Even the slowest machines should be able to finalize deleteSeq within 4
// loops (400ms). If this test ever actually fails feel free to lower this
// cutoff.
BEAST_EXPECTS(iterations > 25, to_string(iterations));
}
lm.clearLedger(deleteSeq);
@@ -699,8 +702,9 @@ public:
// Close another ledger, which will trigger a rotation, but the
// rotation will be stuck until the missing ledger is filled in.
env.close();
// DO NOT CALL rendezvous() without a timeout parameter! You'll end up with a
// deadlock.
// Do not call rendezvous() here without a timeout; it will block until the missing
// ledger is backfilled. That will not happen automatically. It's a manual step that
// is done later in this test.
++maxSeq;
// Nothing has changed

View File

@@ -3,6 +3,7 @@
#include <xrpld/core/Config.h>
#include <atomic>
#include <cstdint>
#include <map>
#include <memory>
#include <string>

View File

@@ -32,6 +32,7 @@
#include <algorithm>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
@@ -669,10 +670,10 @@ SHAMapStoreImp::healthWait()
};
// Tracked server status properties
LedgerIndex index;
LedgerIndex index = 0;
std::chrono::seconds age;
OperatingMode mode;
std::size_t numMissing;
OperatingMode mode = OperatingMode::DISCONNECTED;
std::size_t numMissing = 0;
std::unique_lock lock(mutex_);