[tests] tidy up blocktools.py
[tests] tidy up blocktools.py

Moves function comments to docstrings, and moves the module-level
constant to the top of the file.

jonasschnelli/bitcoin,h4x3rotab/BTCGPU,n1bor/bitcoin,bitcoinknots/bitcoin,afk11/bitcoin,randy-waterhouse/bitcoin,sebrandon1/bitcoin,pstratem/bitcoin,MeshCollider/bitcoin,paveljanik/bitcoin,jambolo/bitcoin,mruddy/bitcoin,alecalve/bitcoin,Sjors/bitcoin,vertcoin/vertcoin,pataquets/namecoin-core,ericshawlinux/bitcoin,Bushstar/UFO-Project,rawodb/bitcoin,FeatherCoin/Feathercoin,GroestlCoin/bitcoin,midnightmagic/bitcoin,FeatherCoin/Feathercoin,jmcorgan/bitcoin,Flowdalic/bitcoin,tjps/bitcoin,DigitalPandacoin/pandacoin,OmniLayer/omnicore,digibyte/digibyte,rawodb/bitcoin,lateminer/bitcoin,myriadteam/myriadcoin,droark/bitcoin,bespike/litecoin,kazcw/bitcoin,ahmedbodi/vertcoin,afk11/bitcoin,lateminer/bitcoin,yenliangl/bitcoin,qtumproject/qtum,GroestlCoin/GroestlCoin,h4x3rotab/BTCGPU,ahmedbodi/vertcoin,particl/particl-core,jamesob/bitcoin,particl/particl-core,particl/particl-core,jtimon/bitcoin,AkioNak/bitcoin,gjhiggins/vcoincore,GroestlCoin/GroestlCoin,wellenreiter01/Feathercoin,practicalswift/bitcoin,instagibbs/bitcoin,peercoin/peercoin,tecnovert/particl-core,guncoin/guncoin,jlopp/statoshi,rawodb/bitcoin,ElementsProject/elements,jamesob/bitcoin,domob1812/huntercore,GroestlCoin/GroestlCoin,afk11/bitcoin,kallewoof/bitcoin,Xekyo/bitcoin,sstone/bitcoin,digibyte/digibyte,bitcoinsSG/bitcoin,domob1812/huntercore,ahmedbodi/vertcoin,instagibbs/bitcoin,mruddy/bitcoin,DigitalPandacoin/pandacoin,yenliangl/bitcoin,jlopp/statoshi,vmp32k/litecoin,particl/particl-core,EthanHeilman/bitcoin,jnewbery/bitcoin,domob1812/huntercore,OmniLayer/omnicore,DigitalPandacoin/pandacoin,cdecker/bitcoin,pstratem/bitcoin,BTCGPU/BTCGPU,sstone/bitcoin,domob1812/bitcoin,sebrandon1/bitcoin,GlobalBoost/GlobalBoost,paveljanik/bitcoin,jlopp/statoshi,EthanHeilman/bitcoin,jtimon/bitcoin,anditto/bitcoin,Kogser/bitcoin,paveljanik/bitcoin,donaloconnor/bitcoin,fujicoin/fujicoin,apoelstra/bitcoin,Flowdalic/bitcoin,peercoin/peercoin,jambolo/bitcoin,droark/bitcoin,midnightmagic/bitcoin,afk11/bitcoin,GlobalBoost/GlobalBoost,RHavar/bitcoin,litecoin-project/litecoin,bespike/litecoin,nikkitan/bitcoin,kallewoof/bitcoin,bitcoin/bitcoin,mm-s/bitcoin,guncoin/guncoin,apoelstra/bitcoin,tecnovert/particl-core,JeremyRubin/bitcoin,h4x3rotab/BTCGPU,guncoin/guncoin,digibyte/digibyte,sipsorcery/bitcoin,JeremyRubin/bitcoin,bespike/litecoin,EthanHeilman/bitcoin,namecoin/namecoin-core,MeshCollider/bitcoin,fujicoin/fujicoin,domob1812/namecore,jambolo/bitcoin,EthanHeilman/bitcoin,AkioNak/bitcoin,bespike/litecoin,pstratem/bitcoin,Bushstar/UFO-Project,AkioNak/bitcoin,midnightmagic/bitcoin,nikkitan/bitcoin,untrustbank/litecoin,r8921039/bitcoin,Kogser/bitcoin,BTCGPU/BTCGPU,joshrabinowitz/bitcoin,namecoin/namecoin-core,BTCGPU/BTCGPU,paveljanik/bitcoin,monacoinproject/monacoin,OmniLayer/omnicore,qtumproject/qtum,rnicoll/bitcoin,n1bor/bitcoin,MeshCollider/bitcoin,lbryio/lbrycrd,kallewoof/bitcoin,sstone/bitcoin,wellenreiter01/Feathercoin,Flowdalic/bitcoin,jonasschnelli/bitcoin,digibyte/digibyte,Bushstar/UFO-Project,CryptArc/bitcoin,tecnovert/particl-core,tecnovert/particl-core,cdecker/bitcoin,ElementsProject/elements,RHavar/bitcoin,mruddy/bitcoin,vertcoin/vertcoin,cdecker/bitcoin,prusnak/bitcoin,lateminer/bitcoin,namecoin/namecore,jmcorgan/bitcoin,peercoin/peercoin,bitcoinsSG/bitcoin,AkioNak/bitcoin,ahmedbodi/vertcoin,AkioNak/bitcoin,wellenreiter01/Feathercoin,mruddy/bitcoin,namecoin/namecore,rnicoll/bitcoin,Xekyo/bitcoin,MarcoFalke/bitcoin,Sjors/bitcoin,CryptArc/bitcoin,Kogser/bitcoin,Christewart/bitcoin,monacoinproject/monacoin,anditto/bitcoin,practicalswift/bitcoin,DigitalPandacoin/pandacoin,r8921039/bitcoin,andreaskern/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,fanquake/bitcoin,nikkitan/bitcoin,BTCGPU/BTCGPU,digibyte/digibyte,ericshawlinux/bitcoin,domob1812/namecore,dscotese/bitcoin,thrasher-/litecoin,untrustbank/litecoin,donaloconnor/bitcoin,vmp32k/litecoin,thrasher-/litecoin,achow101/bitcoin,Kogser/bitcoin,domob1812/bitcoin,ElementsProject/elements,bitcoinsSG/bitcoin,CryptArc/bitcoin,Flowdalic/bitcoin,vmp32k/litecoin,myriadcoin/myriadcoin,sstone/bitcoin,monacoinproject/monacoin,mm-s/bitcoin,ajtowns/bitcoin,lbryio/lbrycrd,GroestlCoin/GroestlCoin,rnicoll/bitcoin,monacoinproject/monacoin,Flowdalic/bitcoin,jnewbery/bitcoin,wellenreiter01/Feathercoin,Kogser/bitcoin,jamesob/bitcoin,practicalswift/bitcoin,jonasschnelli/bitcoin,domob1812/bitcoin,peercoin/peercoin,FeatherCoin/Feathercoin,donaloconnor/bitcoin,rawodb/bitcoin,untrustbank/litecoin,domob1812/bitcoin,andreaskern/bitcoin,anditto/bitcoin,litecoin-project/litecoin,yenliangl/bitcoin,lbryio/lbrycrd,rnicoll/dogecoin,fujicoin/fujicoin,FeatherCoin/Feathercoin,bitcoin/bitcoin,domob1812/huntercore,qtumproject/qtum,qtumproject/qtum,vmp32k/litecoin,jlopp/statoshi,andreaskern/bitcoin,BTCGPU/BTCGPU,Xekyo/bitcoin,practicalswift/bitcoin,particl/particl-core,GroestlCoin/GroestlCoin,litecoin-project/litecoin,ElementsProject/elements,nikkitan/bitcoin,litecoin-project/litecoin,prusnak/bitcoin,gjhiggins/vcoincore,vertcoin/vertcoin,rnicoll/dogecoin,pataquets/namecoin-core,jnewbery/bitcoin,kazcw/bitcoin,donaloconnor/bitcoin,namecoin/namecore,myriadteam/myriadcoin,bespike/litecoin,kazcw/bitcoin,CryptArc/bitcoin,ajtowns/bitcoin,nikkitan/bitcoin,jmcorgan/bitcoin,h4x3rotab/BTCGPU,joshrabinowitz/bitcoin,Xekyo/bitcoin,instagibbs/bitcoin,rnicoll/dogecoin,Christewart/bitcoin,namecoin/namecore,Christewart/bitcoin,JeremyRubin/bitcoin,AkioNak/bitcoin,bitcoin/bitcoin,dscotese/bitcoin,RHavar/bitcoin,lateminer/bitcoin,gjhiggins/vcoincore,mitchellcash/bitcoin,droark/bitcoin,randy-waterhouse/bitcoin,lateminer/bitcoin,myriadteam/myriadcoin,Kogser/bitcoin,donaloconnor/bitcoin,anditto/bitcoin,fanquake/bitcoin,instagibbs/bitcoin,domob1812/namecore,mitchellcash/bitcoin,joshrabinowitz/bitcoin,MarcoFalke/bitcoin,fanquake/bitcoin,sipsorcery/bitcoin,sstone/bitcoin,myriadcoin/myriadcoin,pataquets/namecoin-core,alecalve/bitcoin,MeshCollider/bitcoin,Xekyo/bitcoin,bitcoinknots/bitcoin,fujicoin/fujicoin,Kogser/bitcoin,vmp32k/litecoin,dscotese/bitcoin,yenliangl/bitcoin,Kogser/bitcoin,lbryio/lbrycrd,jnewbery/bitcoin,myriadcoin/myriadcoin,achow101/bitcoin,prusnak/bitcoin,bitcoinknots/bitcoin,paveljanik/bitcoin,domob1812/namecore,myriadteam/myriadcoin,mitchellcash/bitcoin,thrasher-/litecoin,r8921039/bitcoin,Sjors/bitcoin,RHavar/bitcoin,Sjors/bitcoin,ajtowns/bitcoin,rnicoll/dogecoin,jtimon/bitcoin,jmcorgan/bitcoin,GroestlCoin/GroestlCoin,MarcoFalke/bitcoin,practicalswift/bitcoin,EthanHeilman/bitcoin,instagibbs/bitcoin,sipsorcery/bitcoin,sebrandon1/bitcoin,rnicoll/dogecoin,vertcoin/vertcoin,particl/particl-core,joshrabinowitz/bitcoin,alecalve/bitcoin,jtimon/bitcoin,dscotese/bitcoin,bitcoinknots/bitcoin,MeshCollider/bitcoin,achow101/bitcoin,GroestlCoin/bitcoin,BTCGPU/BTCGPU,Kogser/bitcoin,prusnak/bitcoin,alecalve/bitcoin,droark/bitcoin,namecoin/namecoin-core,GroestlCoin/bitcoin,Sjors/bitcoin,qtumproject/qtum,qtumproject/qtum,untrustbank/litecoin,mitchellcash/bitcoin,GlobalBoost/GlobalBoost,prusnak/bitcoin,apoelstra/bitcoin,OmniLayer/omnicore,tjps/bitcoin,wellenreiter01/Feathercoin,RHavar/bitcoin,droark/bitcoin,donaloconnor/bitcoin,jlopp/statoshi,jtimon/bitcoin,r8921039/bitcoin,guncoin/guncoin,nikkitan/bitcoin,untrustbank/litecoin,Christewart/bitcoin,myriadcoin/myriadcoin,gjhiggins/vcoincore,GroestlCoin/bitcoin,CryptArc/bitcoin,h4x3rotab/BTCGPU,jonasschnelli/bitcoin,sipsorcery/bitcoin,kallewoof/bitcoin,midnightmagic/bitcoin,peercoin/peercoin,DigitalPandacoin/pandacoin,Christewart/bitcoin,ajtowns/bitcoin,randy-waterhouse/bitcoin,jmcorgan/bitcoin,sebrandon1/bitcoin,jamesob/bitcoin,mm-s/bitcoin,jtimon/bitcoin,GroestlCoin/bitcoin,afk11/bitcoin,MarcoFalke/bitcoin,apoelstra/bitcoin,ericshawlinux/bitcoin,yenliangl/bitcoin,tjps/bitcoin,FeatherCoin/Feathercoin,bespike/litecoin,rnicoll/bitcoin,namecoin/namecoin-core,lbryio/lbrycrd,namecoin/namecore,fujicoin/fujicoin,jambolo/bitcoin,jambolo/bitcoin,EthanHeilman/bitcoin,wellenreiter01/Feathercoin,vertcoin/vertcoin,joshrabinowitz/bitcoin,GroestlCoin/bitcoin,anditto/bitcoin,ajtowns/bitcoin,bitcoin/bitcoin,RHavar/bitcoin,JeremyRubin/bitcoin,cdecker/bitcoin,Bushstar/UFO-Project,ericshawlinux/bitcoin,bitcoin/bitcoin,MarcoFalke/bitcoin,bitcoin/bitcoin,vertcoin/vertcoin,r8921039/bitcoin,apoelstra/bitcoin,midnightmagic/bitcoin,Kogser/bitcoin,ericshawlinux/bitcoin,thrasher-/litecoin,namecoin/namecoin-core,myriadcoin/myriadcoin,JeremyRubin/bitcoin,domob1812/bitcoin,jamesob/bitcoin,tecnovert/particl-core,fanquake/bitcoin,ericshawlinux/bitcoin,alecalve/bitcoin,midnightmagic/bitcoin,pataquets/namecoin-core,untrustbank/litecoin,pstratem/bitcoin,MeshCollider/bitcoin,thrasher-/litecoin,lbryio/lbrycrd,n1bor/bitcoin,rawodb/bitcoin,h4x3rotab/BTCGPU,randy-waterhouse/bitcoin,Kogser/bitcoin,rnicoll/bitcoin,droark/bitcoin,andreaskern/bitcoin,OmniLayer/omnicore,MarcoFalke/bitcoin,achow101/bitcoin,bitcoinknots/bitcoin,CryptArc/bitcoin,domob1812/namecore,mruddy/bitcoin,FeatherCoin/Feathercoin,pstratem/bitcoin,digibyte/digibyte,myriadteam/myriadcoin,sebrandon1/bitcoin,GlobalBoost/GlobalBoost,gjhiggins/vcoincore,Flowdalic/bitcoin,jmcorgan/bitcoin,andreaskern/bitcoin,mitchellcash/bitcoin,GlobalBoost/GlobalBoost,mm-s/bitcoin,anditto/bitcoin,sipsorcery/bitcoin,domob1812/huntercore,myriadcoin/myriadcoin,Christewart/bitcoin,n1bor/bitcoin,n1bor/bitcoin,mruddy/bitcoin,myriadteam/myriadcoin,cdecker/bitcoin,ElementsProject/elements,ElementsProject/elements,Xekyo/bitcoin,peercoin/peercoin,bitcoinsSG/bitcoin,domob1812/namecore,gjhiggins/vcoincore,achow101/bitcoin,guncoin/guncoin,litecoin-project/litecoin,afk11/bitcoin,mitchellcash/bitcoin,OmniLayer/omnicore,fanquake/bitcoin,jambolo/bitcoin,tjps/bitcoin,sstone/bitcoin,Kogser/bitcoin,dscotese/bitcoin,rawodb/bitcoin,achow101/bitcoin,tjps/bitcoin,paveljanik/bitcoin,litecoin-project/litecoin,fujicoin/fujicoin,ahmedbodi/vertcoin,monacoinproject/monacoin,domob1812/bitcoin,sebrandon1/bitcoin,Bushstar/UFO-Project,fanquake/bitcoin,vmp32k/litecoin,dscotese/bitcoin,yenliangl/bitcoin,bitcoinsSG/bitcoin,ajtowns/bitcoin,prusnak/bitcoin,andreaskern/bitcoin,tjps/bitcoin,cdecker/bitcoin,randy-waterhouse/bitcoin,jonasschnelli/bitcoin,kazcw/bitcoin,apoelstra/bitcoin,ahmedbodi/vertcoin,GlobalBoost/GlobalBoost,kallewoof/bitcoin,pataquets/namecoin-core,bitcoinsSG/bitcoin,joshrabinowitz/bitcoin,kazcw/bitcoin,Bushstar/UFO-Project,kallewoof/bitcoin,mm-s/bitcoin,guncoin/guncoin,jlopp/statoshi,instagibbs/bitcoin,namecoin/namecoin-core,pstratem/bitcoin,GlobalBoost/GlobalBoost,randy-waterhouse/bitcoin,namecoin/namecore,practicalswift/bitcoin,jamesob/bitcoin,kazcw/bitcoin,mm-s/bitcoin,DigitalPandacoin/pandacoin,n1bor/bitcoin,r8921039/bitcoin,domob1812/huntercore,pataquets/namecoin-core,qtumproject/qtum,monacoinproject/monacoin,alecalve/bitcoin,JeremyRubin/bitcoin,rnicoll/bitcoin,thrasher-/litecoin,jnewbery/bitcoin,lbryio/lbrycrd,lateminer/bitcoin