In the <datadir>/static-nodes.json
file, we can mention the enode URI of a node that we want to re-connect to, in case of a connection failure. Assume A
is a static node which has been rebooted. Now, it has a different IP address to the one stored in static-nodes.json
file. Since IP address is a part of the enode URI, how do other nodes find out the new IP address of A
and re-connect to it (in a private blockchain network). Is the static-nodes.json
file updated every time this happens?
Add a comment
|
1 Answer
You should only write nodes with a static IP in <datadir>/static-nodes.json
.
Incidentally, the enode is a way for the client to ensure it does not loop back to itself.