tfix #1579 - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit f30149ad49f220da4639d897586345e7def531e4 (DIR) parent 822260854fee2086c0d8881bb9f228034e092e73 (HTM) Author: ThomasV <thomasv@electrum.org> Date: Sun, 13 Dec 2015 06:33:06 +0100 fix #1579 Diffstat: M lib/blockchain.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- (DIR) diff --git a/lib/blockchain.py b/lib/blockchain.py t@@ -56,8 +56,7 @@ class Blockchain(util.PrintError): self.verify_header(header, prev_header, bits, target) prev_header = header - def verify_chunk(self, index, hexdata): - data = hexdata.decode('hex') + def verify_chunk(self, index, data): num = len(data) / 80 prev_header = None if index != 0: t@@ -212,11 +211,12 @@ class Blockchain(util.PrintError): self.print_error(str(e)) return False - def connect_chunk(self, idx, chunk): + def connect_chunk(self, idx, hexdata): try: - self.verify_chunk(idx, chunk) - self.print_error("validated chunk %d" % index) - self.save_chunk(index, data) + data = hexdata.decode('hex') + self.verify_chunk(idx, data) + self.print_error("validated chunk %d" % idx) + self.save_chunk(idx, data) return idx + 1 except BaseException as e: self.print_error('verify_chunk failed', str(e))