2

is it possible to test a smart contract on a private net with two or more nodes? With nodes I mean two different machines, either virtual or physical, doesn't really matter.

I tried running geth with the usual commands however, the two nodes didn't seem to find each other, as netstat did not show a connection between the two.

All running on the same local network.

What can I do to debug this?

3

You can connect nodes with the --bootnodes command line option of geth, or with the console command admin.addPeer. Check the documentation Connecting to the network.

  • Thanks, is admin.addPeer on both nodes? – fsp Jun 15 '17 at 12:05
  • @fsp It is only needed in one of the nodes. – Ismael Jun 15 '17 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.