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?

2

2 Answers 2

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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