electrum

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

commit aaf89d2325ce114fab152b17d6cacbe150938e89
parent 24054ac39986c7bf9e1b6e30671606eec493807d
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 23 Feb 2018 11:30:59 +0100

fix #3858

Diffstat:
Mlib/verifier.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/verifier.py b/lib/verifier.py @@ -36,11 +36,14 @@ class SPV(ThreadJob): self.merkle_roots = {} def run(self): - if not self.network.interface: + interface = self.network.interface + if not interface: + return + blockchain = interface.blockchain + if not blockchain: return lh = self.network.get_local_height() unverified = self.wallet.get_unverified_txs() - blockchain = self.network.blockchain() for tx_hash, tx_height in unverified.items(): # do not request merkle branch before headers are available if (tx_height > 0) and (tx_height <= lh): @@ -48,7 +51,7 @@ class SPV(ThreadJob): if header is None: index = tx_height // 2016 if index < len(blockchain.checkpoints): - self.network.request_chunk(self.network.interface, index) + self.network.request_chunk(interface, index) else: if tx_hash not in self.merkle_roots: request = ('blockchain.transaction.get_merkle',