electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d808bf057e21ef728e71f926523ad58056f8c526
parent 954897c281eecb45b4f690919b4f623aca57ac28
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 16 Jan 2018 16:35:29 +0100

fix notify command and migrate to use scripthashes

Diffstat:
Mlib/commands.py | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/commands.py b/lib/commands.py @@ -656,13 +656,15 @@ class Commands: import urllib.request headers = {'content-type':'application/json'} data = {'address':address, 'status':x.get('result')} + serialized_data = util.to_bytes(json.dumps(data)) try: - req = urllib.request.Request(URL, json.dumps(data), headers) + req = urllib.request.Request(URL, serialized_data, headers) response_stream = urllib.request.urlopen(req, timeout=5) util.print_error('Got Response for %s' % address) except BaseException as e: util.print_error(str(e)) - self.network.send([('blockchain.address.subscribe', [address])], callback) + h = self.network.addr_to_scripthash(address) + self.network.send([('blockchain.scripthash.subscribe', [h])], callback) return True @command('wn')