-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check sync status of attestation service #2191
Check sync status of attestation service #2191
Conversation
if (blockNumber === 0) { | ||
throw new Error( | ||
'Could not fetch latest block from web3 provider ' + fetchEnv('CELO_PROVIDER') | ||
// Copied from @celo/cli/src/utils/helpers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be better to have a function for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but we only have utils
and I did not want to add web3
as a dependency
Codecov Report
@@ Coverage Diff @@
## master #2191 +/- ##
========================================
Coverage 74.88% 74.88%
========================================
Files 279 279
Lines 7797 7797
Branches 690 971 +281
========================================
Hits 5839 5839
Misses 1842 1842
Partials 116 116
Continue to review full report at Codecov.
|
* master: [Wallet] Use Charles proxy to see eth JSON rpc calls when using forno (#2204) [Wallet] Disable skip button when the user enable contact access (#2224) [Wallet] Redesigning notification lists (#1967) [Wallet] Fix crash on iOS when segment is enabled (#2222) Update documentation wrt. epoch rewards fractions (#2182) Improvement facilitating to run a full node (#2130) [BlockchainApi] Add ability to get exchange rates from/to cGLD or cUSD (#2005) Improve reliability of e2e governance test (#2208) Fix/protocol test flakyness (#2155) Fix bignumber display in CLI (#2212) Doc changes to address frequently asked questions (#2209) Upgrade TS version (#2196) Wait for only waitTime - 1 blocks (#2207) Minor baklava docs reconnection fixes (#2215) Update walletkit gateway fee to fix transactions in forno mode (#2211) Update baklava network ID in docs for 1.1 (#2214) Support more than 1 attesation bot at a time (#2192) Check sync status of attestation service (#2191) Indicate to run Twilio globally (#2193) Add Twilio and attestation bot envs (#2194)
} | ||
} | ||
} else { | ||
throw new Error('Node is not syncing') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the right message? If eth_syncing
returned a non-false
then the node is syncing. Should this message read 'Node is not synced'
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I've opened #2372
Description
This PR copies the CLI sync check.
It also changes the default logging scheme from
json
tohuman
.Tested