Mined blocks

acrosacros Member Posts: 63 ✭✭
How can one tell efficiently how many/which blocks a given account has been mined (ie other than looping through the eth.getBlock(i).miner)?



  • acrosacros Member Posts: 63 ✭✭
    edited May 2015
    Ok for those interested, here's the quick and dirty way I use for now:

    $ geth js <(echo "for (i=323209; i<=323253; i++) { console.log(i + '\t' + web3.eth.getBlock(i).miner);} ; exit;")

    Just replace the 2 numbers with your start/end criteria
  • acrosacros Member Posts: 63 ✭✭
    I should mention the above returns all miners for the blocks specified. To further select your particular address, you can just pipe it to grep and wc -l like this:

    ... | grep '0x1231kafd10923' | wc -l

    Sorry I don't know the windows equivalent...
Sign In or Register to comment.