Created
July 15, 2017 12:07
-
-
Save harding/9f7e40fe610c0baa5d470bd5a5edd206 to your computer and use it in GitHub Desktop.
Get in-block fees
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
sudo apt-get install jq num-utils | |
height=$( bitcoin-cli getblockchaininfo | jq .blocks ) ; for i in $( seq $((height-1008)) $height ) ; do echo -n "$i " ; bitcoin-cli getrawtransaction $( bitcoin-cli getblock $( bitcoin-cli getblockhash $i ) | jq -r '.tx[0]' ) true | jq '.vout[].value' | sed '$a-12.5' | numsum ; done > block-fees.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment