Closed
Description
Here's a nice snippet of code for checking all your accounts, in order:
function checkAllBalances() {
var i =0;
eth.accounts.forEach( function(e){
console.log("\tAccount["+i+"]: \t" + e + " \tbalance: \t" + web3.fromWei(eth.getBalance(e), "ether") + " ether");
i++;
})
};
checkAllBalances();
Check all your balances and note their order. Now do a
admin.newAccount()
and run a
checkAllBalances();
Ideally, the newest account should be added in the end of the array. Instead its seemingly added at random, some times in be [0] slot, sometimes in the last slot, sometimes somewhere in the middle. It's not a but in the checkBalances code, you can check each manually by doing a eth.accounts[x].
Currently my accounts were created in this order:
index order created
0 4th
1 1st
2 3rd
3 2nd
4 5th
Metadata
Metadata
Assignees
Labels
No labels