Browse Source

storage: fix convert_version_17 and add new test case

follow-up 121b8048b0
sqlite_db
SomberNight 6 years ago
parent
commit
9ecb504739
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 6
      electrum/json_db.py
  2. 17
      electrum/tests/test_storage_upgrade.py

6
electrum/json_db.py

@ -399,11 +399,9 @@ class JsonDB(PrintError):
self.put('pruned_txo', None)
from .transaction import Transaction
transactions = self.get('transactions', {}) # txid -> raw_tx
transactions = self.get('transactions', {}) # txid -> Transaction
spent_outpoints = defaultdict(dict)
for txid, raw_tx in transactions.items():
tx = Transaction(raw_tx)
for txid, tx in transactions.items():
for txin in tx.inputs():
if txin['type'] == 'coinbase':
continue

17
electrum/tests/test_storage_upgrade.py

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save