It seems I've made a successful transaction from account[0] to account1. Why does account1 still have a 0 balance?
> var sender = eth.accounts[0];
undefined
> sender
"0x702543f4ae6d7ebdd07dc29c432a0c707b8c2cc0"
> var receiver = eth.accounts[1];
undefined
> receiver
"0xac97d0feb8b4b3bcaa2b153dff1d4eaa5b4bee9c"
> var amount = web3.toWei(1000, 'ether');
undefined
> eth.sendTransaction({from:sender, to:receiver, value: amount})
account is locked
at web3.js:3119:20
at web3.js:6023:15
at web3.js:4995:36
at <anonymous>:1:1
> personal.unlockAccount(sender, "valid_passphrase")
true
> personal.unlockAccount(receiver, "valid_passphase")
true
> eth.sendTransaction({from:sender, to:receiver, value: amount})
I0602 20:32:38.038644 eth/api.go:1193] Tx(0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8) to: 0xac97d0feb8b4b3bcaa2b153dff1d4eaa5b4bee9c
"0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8"
> eth.getBalance(eth.accounts[0])
6.79703125e+21
> eth.getBalance(eth.accounts[1])
0
eth.getTransaction("0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8")
{
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
blockNumber: null,
from: "0x702543f4ae6d7ebdd07dc29c432a0c707b8c2cc0",
gas: 90000,
gasPrice: 20000000000,
hash: "0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8",
input: "0x",
nonce: 0,
to: "0xac97d0feb8b4b3bcaa2b153dff1d4eaa5b4bee9c",
transactionIndex: null,
value: 1e+21
}
SOLUTION:
miner.start(8)
Let the miner run for a couple minutes.
miner.stop()
eth.getTransaction("0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8")
{
blockHash: "0xea06bc12fc1db50416adc90ec0856946f3e69b6bba3ec6722ecaf04538184667",
blockNumber: 1330,
from: "0x702543f4ae6d7ebdd07dc29c432a0c707b8c2cc0",
gas: 90000,
gasPrice: 20000000000,
hash: "0xa7c9e4af88ca93f8bd3c488ed0807da3ec5879456cce9a3093a690a3ccb1dba8",
input: "0x",
nonce: 0,
to: "0xac97d0feb8b4b3bcaa2b153dff1d4eaa5b4bee9c",
transactionIndex: 0,
value: 1e+21
}
geth
instances, the transaction will be lost.