6

There are 3 nodes in my development environment. I use eth.sendTransaction to post some transactions ,and it seems that the transactions are not broadcast to other nodes.

JSON-RPC Request is :

{"jsonrpc":"2.0",
"method":"eth_sendTransaction",
"params":[{
            "gas":"0xea60",
            "gasPrice":"0x384",
            "to": "0x3d30704a45c6fd56b187343f3b3d21c443c2cdc1",
            "from":"0x01b537e37dbf4c917152a6012364193d6cc02ca9",
            "data":"0xf8b2cb4f....daa71b88ff922d735a7"
          }],
"id":1}

enter image description here

How can I broadcast the transactions to the whole network?

Achala Dissanayake
  • 5,819
  • 15
  • 28
  • 38
Panda
  • 153
  • 1
  • 5
  • 2
    Please check if your account is unlocked. If your account is locked, the transaction is sent but you do not get a receipt. See http://ethereum.stackexchange.com/questions/4307/why-contracts-cant-be-deployed-on-my-private-chain-using-geth-cli/4309#4309. – BokkyPooBah Jun 23 '16 at 13:56
  • 1
    How did you confirm that the transaction was not broadcast? – Xavier Leprêtre B9lab Aug 23 '16 at 17:11

2 Answers2

1

By default, accounts are locked so you will need to unlock your account: See this Unlock an Account with geth answer

Do this one of 2 ways:

  1. Through your geth console

geth --unlock --password

  1. Through geth javascript console

personal.unlockAccount(address, "password")

Keep in mind that entering the password non-interactivly stores the password in plaintext in the console history. So, the first option is the better way.

Mike Garber
  • 116
  • 8
0

You can set the unlock time as a 3rd parameter in personal.unlockAccount so you can keep it unlocked for a long time period. I think the default is 5 minutes.

Karan Kurbur
  • 367
  • 1
  • 12