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-check command
    • Report everything is fine with a table
  • Write tests
  • Global option --check/-c to 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-check the checks should not be run twice: when flag on, do not run command
Edited by Moul