mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Update operating mode upon network disagreement.
This commit is contained in:
committed by
Nik Bougalis
parent
a9a4e2c8fb
commit
e5b61c9ac9
@@ -212,11 +212,12 @@ ShardArchiveHandler::complete(path dstPath)
|
||||
{
|
||||
// If validating and not synced then defer and retry
|
||||
auto const mode {ptr->app_.getOPs().getOperatingMode()};
|
||||
if (ptr->validate_ && mode != NetworkOPs::omFULL)
|
||||
if (ptr->validate_ && mode != OperatingMode::FULL)
|
||||
{
|
||||
std::lock_guard lock(m_);
|
||||
timer_.expires_from_now(static_cast<std::chrono::seconds>(
|
||||
(NetworkOPs::omFULL - mode) * 10));
|
||||
(static_cast<std::size_t>(OperatingMode::FULL)
|
||||
- static_cast<std::size_t>(mode)) * 10));
|
||||
timer_.async_wait(
|
||||
[=, dstPath = std::move(dstPath), ptr = std::move(ptr)]
|
||||
(boost::system::error_code const& ec)
|
||||
|
||||
Reference in New Issue
Block a user