Last active
September 29, 2017 11:38
-
-
Save martinhbramwell/e03cb203b36a9d1523a73c7fd0409e3e to your computer and use it in GitHub Desktop.
Trivial mining script for a private block chain to create some initial pseudo-ether for testing purposes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
primary = eth.accounts[0]; | |
balance = web3.fromWei(eth.getBalance(primary), "ether"); | |
miner.setEtherbase(primary) | |
console.log(" -Starting mining."); | |
miner.start(8); admin.sleepBlocks(3); miner.stop() ; | |
console.log(" - Mined 3 blocks "); | |
balance = web3.fromWei(eth.getBalance(primary), "ether"); | |
console.log("( Account " + primary + " holds " + balance + " Eth. )"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment