Skip to content

j-s/getblockdata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

getblockdata

This program pulls the following information about the blocks in the blockchain from your own node in range of blocks you specify.

height, reward, block hash, size, number of transactions, version, merkleroot, UNIX timestamp (UTC), nonce, bits, difficulty, chainwork

First you'll need to install jgarzik's python-bitcoinrpc with:

git clone https://github.com/jgarzik/python-bitcoinrpc
python setup.py install 

You'll also need to run your node with these in the bitcoin.conf file:

server=1
listen=1
txindex=1
rpcallowip=127.0.0.1
rpctimeout=30
rpcuser=rpcusername
rpcpassword=chooserpcpassword

If you don't usually run with txindex=1, then when you restart it you'll need to run with -reindex as well, and it will take about 24 hours (depending on CPU) to rebuild your index, and you'll have all transactions on the blockchain indexed after it's done. Then, make a blank blockchain.txt file in your python folder. And then you can run the program.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%