electrum

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

commit bd5c83e906e03930c65015784eaf176e2d47b99b
parent b4932198298a10125a082b7beb1a1b525370095c
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 12 Aug 2019 18:14:21 +0200

fix race condition with channel_timestamps

Diffstat:
Melectrum/lnworker.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/electrum/lnworker.py b/electrum/lnworker.py @@ -443,7 +443,10 @@ class LNWallet(LNWorker): out.append(item) # add funding events for chan in self.channels.values(): - funding_txid, funding_height, funding_timestamp, closing_txid, closing_height, closing_timestamp = self.channel_timestamps.get(bh2u(chan.channel_id)) + item = self.channel_timestamps.get(chan.channel_id.hex()) + if item is None: + continue + funding_txid, funding_height, funding_timestamp, closing_txid, closing_height, closing_timestamp = item item = { 'channel_id': bh2u(chan.channel_id), 'type': 'channel_opening',