This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
bitchin tricks
Jeffrey Wilcke edited this page Feb 2, 2016
·
9 revisions
- My
shitclient doesn't work! 🖕
git pull
- I only want to mine when there are transactions!
function checkWork() {
if( eth.getBlock("pending").transactions.length > 0 ) {
if( !eth.mining ) miner.start(1);
} else {
miner.stop(0);
}
}
setInterval(function() {
checkWork();
}, 500);
eth.filter("latest", function(err, block) {
checkWork();
});
- I want to get some data out without running a node!
$ geth --exec "eth.accounts" console 2>/dev/null
["0x0000000000000000000000000000000000000000"]
- I want to get some data out without RPC magic!
$ geth --exec "eth.accounts" attach
["0x0000000000000000000000000000000000000000"]
❤️ Stay Classy