tMerge branch 'master' of https://github.com/chris-belcher/electrum-personal-server - electrum-personal-server - Maximally lightweight electrum server for a single user
git clone https://git.parazyd.org/electrum-personal-server
Log
Files
Refs
README
---
commit b8aab06cf37cf2e2c0831d42c929135ce5a1f346
parent cbd7953d8857566b756d0302bf423bd1b882f726
Author: chris-belcher 
Date:   Sun,  8 Apr 2018 16:42:43 +0100

Merge branch 'master' of https://github.com/chris-belcher/electrum-personal-server

Diffstat:
  M bitcoin/deterministic.py            |       2 +-
  M server.py                           |      16 ++++++++++++++--

2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/bitcoin/deterministic.py b/bitcoin/deterministic.py
t@@ -21,7 +21,7 @@ PUBLIC = [  b'\x04\x88\xb2\x1e', #mainnet p2pkh or p2sh xpub
             b'\x02\xaa\x7e\xd3', #mainnet p2wsh Zpub
             b'\x04\x35\x87\xcf', #testnet p2pkh or p2sh tpub
             b'\x04\x4a\x52\x62', #testnet p2wpkh-p2sh upub
-            b'\x02\x42\x85\xef', #testnet p2wsh-p2sh Upub
+            b'\x02\x42\x89\xef', #testnet p2wsh-p2sh Upub
             b'\x04\x5f\x1c\xf6', #testnet p2wpkh vpub
             b'\x02\x57\x54\x83' #testnet p2wsh Vpub
         ]
diff --git a/server.py b/server.py
t@@ -166,8 +166,14 @@ def handle_query(sock, line, rpc, txmonitor):
         for i in range(count):
             header = rpc.call("getblockheader", [the_hash])
             #add header hex to result
+            if "previousblockhash" in header:
+                prevblockhash = header["previousblockhash"]
+            else:
+                # this is the genesis block
+                # it does not have a previous block hash
+                prevblockhash = "00"*32
             h1 = struct.pack("