I'm having trouble getting a couple test transactions to show up in the destination account balance. Code is below. Appreciate someone pointing out whatever move I've made...
Running geth as:
geth --rpc --networkid=34534 --maxpeers=0 --datadir=~/.ethereum/DevChain/ --mine --minerthreads 1 --genesis development_genesis.json console
Console session:
> var receiver = eth.accounts[1];
undefined
> var amount = web3.toWei(1, "ether")
undefined
> var amount = web3.toWei(2, "ether")
undefined
> personal.unlockAccount(eth.accounts[0], “passwd”, 9000)
true
> eth.sendTransaction({from:sender, to:receiver, value: amount})
I0401 19:49:03.928354 eth/api.go:1072] Tx(0x8c3c85c225c76bd558cba37c7336d73aec9825e668da3b241d80119bde3a6d40) to: 0x9a22b931b03768958141afa40d66fa587c7bfd3a
"0x8c3c85c225c76bd558cba37c7336d73aec9825e668da3b241d80119bde3a6d40"
> eth.pendingTransactions
[{
blockHash: "0x0000000000000000000000000000000000000000000000000000000000000000",
blockNumber: null,
from: "0x87fa50f10eda0ee47376427d4623deae9577c048",
gas: "0x15f90",
gasPrice: "0x4a817c800",
hash: "0x8c3c85c225c76bd558cba37c7336d73aec9825e668da3b241d80119bde3a6d40",
input: "0x",
nonce: "0x0",
to: "0x9a22b931b03768958141afa40d66fa587c7bfd3a",
transactionIndex: null,
value: "0x1bc16d674ec80000"
}]
>
> miner.start(1)
I0401 19:49:13.013921 miner/miner.go:119] Starting mining operation (CPU=1 TOT=2)
true
> I0401 19:49:13.044968 miner/worker.go:564] commit new work on block 28 with 1 txs & 0 uncles. Took 31.004161ms
> checkAllBalances()
eth.accounts[0]: 0x87fa50f10eda0ee47376427d4623deae9577c048 balance: 135 ether
eth.accounts[1]: 0x9a22b931b03768958141afa40d66fa587c7bfd3a balance: 0 ether
I wanted to see 2 ether in that second account. (Actually 3 ether since a prior transaction also never seems to have gone through.)
checkAllBalances() is:
function checkAllBalances() {
var i =0;
eth.accounts.forEach( function(e){
console.log(" eth.accounts["+i+"]: " + e + " \tbalance: " + web3.fromWei(eth.getBalance(e), "ether") + " ether");
i++;
})
};
The transferred 2 ether just finally showed up, after about 5 blocks were mined. Is that expected behavior?
But then I sent another 3 ether and it showed in other account balance much more quickly. Now I have 0.5 ether pending, with mining output recognizing 1 txn but eth.pendingTransactions still showing it pending.
Is there a private testnet block explorer?
Would love a way to plug in a transaction and get a picture of what's happening.
Appreciate your tips as I learn the basics!