1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00
electrs/contrib/get_tip.py

17 lines
379 B
Python
Raw Permalink Normal View History

2021-03-26 09:05:58 +01:00
#!/usr/bin/env python3
import argparse
import client
import json
def main():
parser = argparse.ArgumentParser()
parser.add_argument("host")
parser.add_argument("port", type=int)
args = parser.parse_args()
conn = client.Client((args.host, args.port))
print(conn.call([client.request("blockchain.headers.subscribe")]))
2021-03-26 09:05:58 +01:00
if __name__ == '__main__':
main()