C++ framework for fast blockchain.address.get_history
[electrum-server.git] / backends / libbitcoin / h1.py
diff --git a/backends/libbitcoin/h1.py b/backends/libbitcoin/h1.py
new file mode 100644 (file)
index 0000000..1a90b28
--- /dev/null
@@ -0,0 +1,17 @@
+import bitcoin
+import history1 as history
+
+def blockchain_started(ec, chain):
+    print "Blockchain initialisation:", ec
+
+def finish(ec):
+    print "Finish:", ec
+
+a = bitcoin.async_service(1)
+chain = bitcoin.bdb_blockchain(a, "/home/genjix/libbitcoin/database",
+                               blockchain_started)
+txpool = bitcoin.transaction_pool(a, chain)
+address = "1Jqu2PVGDvNv4La113hgCJsvRUCDb3W65D"
+history.payment_history(a, chain, txpool, address, finish)
+raw_input()
+