When I using ethconsole to deal with a private chain. I hope it can connects to another node which I get the node information. But the command "web3.admin.addPeer("enode://...@",function () { console.log(arguments) })" return an error. That is "BigNumber Error: new BigNumber() not a number: enode://...@ ". What happened here? How to connect to another node by using ethconsole in cpp-ethereum client?


According to this you are able to use the following command in the console admin.addPeer(url)

This is the example given by the docs: admin.addPeer("enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@")

Maybe you could try the same without the web3.

  • Thank you for replay. But what I'm using is ethconsole which just have node.js code. If I just enter "web3.admin.addPeer("enode://...@")" that will return an error like "Error: You tried to send "miner_addPeer" synchronously. Synchronous requests are not supported by the IPC provider". And if I try that without the "web3." that just cannot use. – Whisperd130 Mar 19 '18 at 2:33
  • And I believe the command of doc in example is for go-ethereum, and I have use cpp-ethereum. I have not see any guild in the website. – Whisperd130 Mar 19 '18 at 2:43

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.