Skip to content

Instantly share code, notes, and snippets.



Created Aug 24, 2017
What would you like to do?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) Copyright 2017 by Narcelio Filho <>
# pip install git+
import bitcoin.rpc
import socket
node = bitcoin.rpc.Proxy()
i = 1
for height in range(481824, 481834+1):
block_hash = node.getblockhash(height)
block = node.getblock(block_hash)
for tx in block.vtx:
if tx.is_coinbase():
if tx.has_witness():
print(i, tx.GetTxid()[::-1].hex())
i += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment