I launched a private network by using geth --datadir data/node1 --http --dev --http.corsdomain "*" --http.api web3,eth,debug,personal,net,miner --allow-insecure-unlock --mine
command.
I am able to attach to it geth attach http://localhost:8545
but the balance of the default account is only 1.15 ether:
eth.getBalance(eth.accounts[0]) 1.15792089237316195423570985008687907853269984665640564039457582226449518702905e+77
I'd like to give it more ethers so I run:
miner.start() null And I can see there is a warn in the node log:
INFO [11-28|20:29:38.512] Transaction pool price threshold updated price=1
INFO [11-28|20:29:38.512] Commit new mining work number=4 sealhash=73b6e7..5d8b72 uncles=0 txs=0 gas=0 fees=0 elapsed="174.436µs"
WARN [11-28|20:29:38.512] Block sealing failed err="sealing paused while waiting for transactions"
I wonder what the issue could be?
Perhaps you have not previously given permission for the miner to sign the genesis block. POA uses the Clique API to manage the seal list.
> clique.proposals
{}
> clique.propose("0xc077f8420d5b6c125897d9c5e21293ff6f77855c", true)
true
> clique.proposals
{
0xc077f8420d5b6c125897d9c5e21293ff6f77855c: true
}
> clique.getSnapshot()
{
hash: "0xfbfe67cd638d21f528036130cc703be8f8fdccb934d871f3f8c2eccda1ed4bf5",
number: 11,
recents: {
10: "0xc077f8420d5b6c125897d9c5e21293ff6f77855c",
11: "0x726794b16f6c5b0be0b78d7713a876ed3da8be1a"
},
signers: {
0x726794b16f6c5b0be0b78d7713a876ed3da8be1a: {},
0xc077f8420d5b6c125897d9c5e21293ff6f77855c: {}
},
tally: {},
votes: []
}`enter code here`
enter code here
You can see more details in this manual: https://yenhuang.gitbooks.io/blockchain/content/interact-with-private-chain-on-android/build-the-private-chain.html
You can also top up your balance using:
eth.sendTransaction({from:eth.coinbase, to:eth.accounts[1], value: web3.toWei(0.05, "ether")})