Skip to content

Conversation

@cjcobb23
Copy link
Contributor

@cjcobb23 cjcobb23 commented Aug 24, 2022

close time in the ledger header is not accurate to the second. Sometimes, the close time is a second or two in the future, and so the age was being calculated as negative, which converts to a very large unsigned integer. This caused us to skip publishing ledgers.


This change is Reviewable

@cjcobb23 cjcobb23 requested a review from natenichols August 24, 2022 14:12
@cjcobb23
Copy link
Contributor Author

We don't publish ledgers that are over 10 minutes old

* 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
@cjcobb23 cjcobb23 force-pushed the skipping_publishing branch from 70b7a25 to 0ec8de0 Compare August 24, 2022 14:17
@cjcobb23 cjcobb23 changed the title Handle case where ledger close time is in the future Fix bug causing some ledgers to not be published Aug 24, 2022
@cjcobb23 cjcobb23 merged commit 83a099a into XRPLF:develop Sep 7, 2022
manojsdoshi pushed a commit to manojsdoshi/clio that referenced this pull request Nov 2, 2022
* 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
manojsdoshi pushed a commit to manojsdoshi/clio that referenced this pull request Nov 2, 2022
* 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
manojsdoshi pushed a commit to manojsdoshi/clio that referenced this pull request Nov 2, 2022
* 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
@manojsdoshi manojsdoshi mentioned this pull request Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants