From d73f7a2c1080ff564a123b67340dae02f31d2f1f Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 26 Feb 2019 08:45:24 +0100 Subject: [PATCH] jsondb: convert lists to sets --- electrum/json_db.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/electrum/json_db.py b/electrum/json_db.py index 34d08cf0d..a6ac6b71a 100644 --- a/electrum/json_db.py +++ b/electrum/json_db.py @@ -599,10 +599,11 @@ class JsonDB(PrintError): self.verified_tx = self.get_data_ref('verified_tx3') # txid -> TxMinedInfo. Access with self.lock. self.tx_fees = self.get_data_ref('tx_fees') - # tuple to set - for txid, d in list(self.txi.items()): - for addr, lst in d.items(): - self.txi[txid][addr] = set([tuple(x) for x in lst]) + # convert list to set + for t in self.txi, self.txo: + for d in t.values(): + for addr, lst in d.items(): + d[addr] = set([tuple(x) for x in lst]) # remove unreferenced tx for tx_hash in self.transactions: