Check whether RPC and GraphQL endpoints are sync and running same currency
Pre-check before running a command on the network:
- Check the indexer and the RPC endpoint are sync: same block number and hash, one blocks on the indexer is accepted and should be warned
- Check they are running the same currency by checking the genesis block hash on the indexer and RPC endpoints
-
Create
network-checkcommand- Report everything is fine with a table
- Write tests
-
Global option
--check/-cto turn-on (disabled by default) check at start-up -
Run checks at start-up? Slows down. Would be great for a desktop app.
-
When running
network-checkthe checks should not be run twice: when flag on, do not run command
-
When running
Edited by Moul