Commit graph

11 commits

Author SHA1 Message Date
SomberNight
02fcc6f570
wallet_db.get_transaction: tolerate if tx_hash is None
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 1503, in do_pay
    self.do_pay_invoice(invoice)
  File "...\electrum\electrum\gui\qt\main_window.py", line 1516, in do_pay_invoice
    self.pay_onchain_dialog(self.get_coins(), outputs)
  File "...\electrum\electrum\gui\qt\main_window.py", line 1570, in pay_onchain_dialog
    self.preview_tx_dialog(make_tx=make_tx,
  File "...\electrum\electrum\gui\qt\main_window.py", line 1574, in preview_tx_dialog
    d = PreviewTxDialog(make_tx=make_tx, external_keypairs=external_keypairs,
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 654, in __init__
    self.update()
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 392, in update
    tx_details = self.wallet.get_tx_info(self.tx)
  File "...\electrum\electrum\wallet.py", line 486, in get_tx_info
    tx_we_already_have_in_db = self.db.get_transaction(tx_hash)
  File "...\electrum\electrum\json_db.py", line 44, in wrapper
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\wallet_db.py", line 822, in get_transaction
    assert isinstance(tx_hash, str)
AssertionError

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\confirm_tx_dialog.py", line 65, in timer_actions
    self.update()
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 392, in update
    tx_details = self.wallet.get_tx_info(self.tx)
  File "...\electrum\electrum\wallet.py", line 486, in get_tx_info
    tx_we_already_have_in_db = self.db.get_transaction(tx_hash)
  File "...\electrum\electrum\json_db.py", line 44, in wrapper
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\wallet_db.py", line 822, in get_transaction
    if tx_hash is None:
AssertionError
2020-02-28 20:23:50 +01:00
SomberNight
88658f9c2c
WalletDB: add type hints, and also corresponding asserts for sanity 2020-02-24 18:26:49 +01:00
ThomasV
20d8da7e24 db upgrade: store channel tx height and timestamps in 'channels' 2020-02-24 10:07:55 +01:00
ThomasV
317d405432 follow-up previous commit 2020-02-19 11:39:52 +01:00
ThomasV
cc6e461d3e storage upgrade for invoices and requests. fixes #5959 2020-02-19 11:26:03 +01:00
SomberNight
111ef9ebb1
follow-up fixes to storage-db separation
e1ce3aace7
2020-02-13 20:00:12 +01:00
ThomasV
beee880dba fix data_loss_protect (missing return, json conversion) 2020-02-12 14:19:31 +01:00
ThomasV
e1ce3aace7 Separate db from storage
- storage is content-agnostic
 - db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
ThomasV
dbceed2647 Restructure wallet storage:
- Perform json deserializations in wallet_db
 - use StoredDict class that keeps tracks of its modifications
2020-02-04 13:35:58 +01:00
ThomasV
b08947a506 storage upgrade: convert lists to dict (txi, txo, revocation_store channels) 2020-02-04 12:11:18 +01:00
ThomasV
149cd9598a Separate JsonDB and WalletDB 2020-02-03 12:36:07 +01:00