Search code examples
blockchainwavesplatform

How to know if my Waves node is on fork or not?


I’m running my Waves node but I can’t figure out if I’m on fork or not. How to know exactly if the node is on a fork or not? is there an utility or API command that show it?


Solution

  • You can check the blockchain height or the last 100 signatures of blocks to understand if your node is on a fork or not (compare block generators and signatures with other nodes API. http://dev.pywaves.org/nodes/ can also show the status of nodes).

    You can use the rest api with swagger on different nodes to compare block # on both. looking for different generators in the same block height.

    Your node can be in one of two possibilities: your node on a fork with height less than 2000 blocks or more than 2000 blocks. In case that your node is on a fork with a height less than 2000 blocks, here you can implement rollback through rollback instructions. Otherwise, you need to choose an option for Getting Actual Blockchain.