Last active
August 18, 2017 21:46
-
-
Save narcelio/efc8e7bd631ae0dccd7e985a2fd0e8af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env python3 | |
# pip3 install python-bitcoinlib | |
import bitcoin.rpc | |
import re | |
node = bitcoin.rpc.Proxy() | |
for height in range(480000, node.getblockcount()): | |
block_hash = node.getblockhash(height) | |
block = node.getblock(block_hash) | |
coinbase = block.vtx[0] | |
txin = coinbase.vin[0] | |
sig = txin.scriptSig | |
b = re.sub(rb'[^\x20-\x7e]',rb'', sig) | |
s = b.decode() | |
if 'Minerworld' in s: | |
print('Bloco minerado pela Minerworld:', height) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment