6

Is there a way to tell if a node I am running is "current" along with the rest of the network? For example, if I am checking transactions against my node, how do I first ensure that my node's copy of the blockchain is the most current and up to date?

Reason being- I'd like to be able to write a script that checks for this and alerts me if my node is running behind.

user36303
  • 34,858
  • 2
  • 57
  • 123
muncherelli
  • 163
  • 3

1 Answers1

8

There are two ways you can do that:

  • check your node is at most one or two blocks behind the highest height known in its peers
  • check whether a new release is available

The first one can by done by running sync_info in monerod, which reports your height as well as that of your peers. The RPC to get that information is sync_info.

The second one can be done by running "update check" in monerod. The RPC to do this is update.

user36303
  • 34,858
  • 2
  • 57
  • 123