From beee880dbaaac7680c923e823b238b2fd78bf1ce Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 12 Feb 2020 14:19:31 +0100 Subject: [PATCH] fix data_loss_protect (missing return, json conversion) --- electrum/lnchannel.py | 2 +- electrum/wallet_db.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 690aa6195..dbed0411b 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -153,7 +153,7 @@ class Channel(Logger): self.data_loss_protect_remote_pcp[key] = value def get_data_loss_protect_remote_pcp(self, key): - self.data_loss_protect_remote_pcp.get(key) + return self.data_loss_protect_remote_pcp.get(key) def set_remote_update(self, raw): self.storage['remote_update'] = raw.hex() diff --git a/electrum/wallet_db.py b/electrum/wallet_db.py index 2dae190ee..4d4b68fbb 100644 --- a/electrum/wallet_db.py +++ b/electrum/wallet_db.py @@ -971,6 +971,8 @@ class WalletDB(JsonDB): v = dict((k, {(prevout, value) for (prevout, value) in x}) for k, x in v.items()) elif key == 'buckets': v = dict((k, ShachainElement(bfh(x[0]), int(x[1]))) for k, x in v.items()) + elif key == 'data_loss_protect_remote_pcp': + v = dict((k, bfh(x)) for k, x in v.items()) return v def _convert_value(self, path, key, v):