mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-05 17:56:45 +00:00
Fix bug where some ledgers are not being published (#281)
* The ledger close time can occasionally be a few seconds in the future, which causes ETL to not publish the ledger, because the age calculation wraps around and the age is computed as a very large unsigned integer. This fix rounds to zero when the age would be negative
This commit is contained in:
@@ -382,6 +382,8 @@ public:
|
||||
std::chrono::system_clock::now().time_since_epoch())
|
||||
.count();
|
||||
auto closeTime = lastCloseTime_.time_since_epoch().count();
|
||||
if (now < (rippleEpochStart + closeTime))
|
||||
return 0;
|
||||
return now - (rippleEpochStart + closeTime);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user