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:
CJ Cobb
2022-09-07 16:17:42 -04:00
committed by GitHub
parent 73337d0819
commit 83a099a547

View File

@@ -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);
}
};