2

I have created and started two nodes

Node 1:

$./geth --datadir p22333/ --port 22333 account new

$./geth --datadir p22333/ --port 22333 init genesis.json

$./geth --datadir p22333/ --port 22333 console

Node 2:

$./geth --datadir p22334/ --port 22334 account new

$./geth --datadir p22334/ --port 22334 init genesis.json

$./geth --datadir p22334/ --port 22334 console

Later I added the node 1 with node 2 using the admin.addpeer()

On Node 1 console:

admin.addpeer("hexaddress of node 2")
net.peerCount

1

On node 2 console:

net.peerCount

1

personal.unlockAccount("hexaddress of node 2", "password")

true

eth.sendTransactions({from:"hexaddress of node 2",to:"hexaddress of node 1",value:web3:toWei(40,"ether"),gas:30000})

0x2312312......

eth.pendingTransaction

{ hash:21... from:31.... }

On node 1:

eth.pendingTransaction

[]

It is not showing the pending transactions on other nodes as well as When I mine on node 1, it is not taking the transaction of node 2. Where is my mistake?

1

1- use the same network id :--networkid

2- consult the documentation to see how to use admin.addpeer()

admin.addPeer("enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@IP_address:30303")

node URL is get by using admin.nodeInfo

3- personal.unlockAccount is used for etherum address not node address

4- more details on nodes connections : https://github.com/ethereum/go-ethereum/wiki/Connecting-to-the-network

  • even after --networkid, same problem exist. I used --networkid 121 – userven Dec 1 '16 at 12:28
  • now the problem is solved. I was not synchronizing. thanks – userven Dec 2 '16 at 14:29

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.