0

I've successfully connected to a local ethereum node with geth. I'd like to send a transaction from one account to another but I get errors that the accounts are unknown, even though the one account has a balance.

 ❯❯❯ geth attach ws://127.0.0.1:65130/ext/bc/C/ws
Welcome to the Geth JavaScript console!

instance: v0.8.4-rc.3
coinbase: 0x0100000000000000000000000000000000000000
at block: 0 (Wed Dec 31 1969 18:00:00 GMT-0600 (CST))
 modules: eth:1.0 net:1.0 rpc:1.0 web3:1.0

To exit, press ctrl-d or type exit
> eth.getBalance("0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52Fc")
5e+25
> eth.sendTransaction({from:"0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC", to:"0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FD", value: web3.toWei(0.05, "ether")})
Error: unknown account
        at web3.js:6365:37(47)
        at send (web3.js:5099:62(35))
        at <eval>:1:20(15)

Why is geth complaining of an unknown account when I've verified the account has a balance? How can I use geth to send a transaction using this account?

1 Answer 1

0

Turns out I had to import and unlock the account in order to be able to send a transaction

> personal.importRawKey("56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027", "lol")
"0x8db97c7cece249c2b98bdc0226cc4c2a57bf52fc"
> personal.unlockAccount("0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC", "lol", 300)

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.