From e9655d3084f2d9cbfc4aae0c315d2c0c35cc8cab Mon Sep 17 00:00:00 2001 From: Parth Oberoi Date: Mon, 9 Sep 2019 23:23:20 +0530 Subject: [PATCH] v3.2.3 (#15) * Udate DifficultyAdjustment BRANCH, fix header check * update electrum server list --- lib/network.py | 2 +- lib/servers.json | 2 +- lib/transaction.py | 3 ++- lib/version.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/network.py b/lib/network.py index 6f75437a..88653a92 100644 --- a/lib/network.py +++ b/lib/network.py @@ -831,7 +831,7 @@ class Network(util.DaemonThread): self.connection_down(interface.server) return - if len(hex_header) != HDR_LEN*2 and len(hex_header) != HDR_EH_192_7_LEN: + if len(hex_header) != HDR_LEN*2 and len(hex_header) != HDR_EH_192_7_LEN*2: interface.print_error('wrong header length', interface.request) self.connection_down(interface.server) return diff --git a/lib/servers.json b/lib/servers.json index 73e78146..16d7eb26 100644 --- a/lib/servers.json +++ b/lib/servers.json @@ -1,5 +1,5 @@ { - "electrum.zclcore.com": { + "electrum.zclassic-ce.org": { "pruning": "-", "s": "50002", "t": "50001", diff --git a/lib/transaction.py b/lib/transaction.py index 85dbfdac..76ce0b65 100644 --- a/lib/transaction.py +++ b/lib/transaction.py @@ -47,6 +47,7 @@ OVERWINTER_BRANCH_ID = 0x5BA81B19 SAPLING_VERSION_GROUP_ID = 0x892F2085 SAPLING_BRANCH_ID = 0x76B809BB BUBBLES_BRANCH_ID = 0x821A451C +DIFFADJ_BRANCH_ID = 0x930B540D class TransactionVersionError(Exception): @@ -994,7 +995,7 @@ class Transaction: # add signature if self.overwintered: data = bfh(self.serialize_preimage(i)) - person = b'ZcashSigHash' + BUBBLES_BRANCH_ID.to_bytes(4, 'little') + person = b'ZcashSigHash' + DIFFADJ_BRANCH_ID.to_bytes(4, 'little') pre_hash = blake2b(data, digest_size=32, person=person).digest() else: pre_hash = Hash(bfh(self.serialize_preimage(i))) diff --git a/lib/version.py b/lib/version.py index 158f08de..b230c80b 100644 --- a/lib/version.py +++ b/lib/version.py @@ -1,4 +1,4 @@ -ELECTRUM_VERSION = 'v3.2.2' # version of the client package +ELECTRUM_VERSION = 'v3.2.3' # version of the client package PROTOCOL_VERSION = '1.2' # protocol version requested # The hash of the mnemonic seed must begin with this