electrum

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

commit d73f7a2c1080ff564a123b67340dae02f31d2f1f
parent 4b36114d0d852d379dbe3f64d4fb28188c0b8226
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 26 Feb 2019 08:45:24 +0100

jsondb: convert lists to sets

Diffstat:
Melectrum/json_db.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 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: