ThomasV
04fb329c2e
swaps: stop watching address once utxo is spent and mined
6 years ago
SomberNight
2b1a150c52
multi-wallet: properly stop lnworker/lnwatcher
6 years ago
ThomasV
9224404108
Move callback manager out of Network class
6 years ago
ThomasV
99f933401a
add more logging shortcuts
6 years ago
SomberNight
900a7631cf
commands: add new cmd "getprivatekeyforpath" to export a WIF for a path
...
related: #6061
6 years ago
SomberNight
7a574c3cbc
wallet/GUI: don't allow "removing" a LN force-close-tx from history
6 years ago
SomberNight
d8180c678b
Qt addresses list: show derivation path in tooltip (also addr dialog)
...
related: #5641
6 years ago
SomberNight
4a8ee1818a
follow-up prev
...
E/W | lnwatcher.LNWalletWatcher | Exception in on_network_update: AssertionError('None')
Traceback (most recent call last):
File "...\electrum\electrum\util.py", line 1035, in wrapper
return await func(*args, **kwargs)
File "...\electrum\electrum\lnwatcher.py", line 174, in on_network_update
await self.check_onchain_situation(address, outpoint)
File "...\electrum\electrum\lnwatcher.py", line 184, in check_onchain_situation
closing_height = self.get_tx_height(closing_txid)
File "...\electrum\electrum\address_synchronizer.py", line 597, in get_tx_height
verified_tx_mined_info = self.db.get_verified_tx(tx_hash)
File "...\electrum\electrum\json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\wallet_db.py", line 859, in get_verified_tx
assert isinstance(txid, str), f"{repr(txid)}"
AssertionError: None
6 years ago
ThomasV
9616333b39
add_future_tx should return success
6 years ago
SomberNight
0d33da2f95
wallet: (sanity) is_mine now guaranteed to handle 'None' input
6 years ago
SomberNight
d2f132738a
wallet: only select mature coins by default
...
this is a regression from #5721
Removed the `TxInput.is_coinbase` method as I think it is a confusing API,
instead we now have `TxInput.is_coinbase_input` and `TxInput.is_coinbase_output`.
related #5872
6 years ago
SomberNight
30dcab0877
wallet: allow saving partial txns as local (but require txid)
6 years ago
SomberNight
8e89c0c971
wallet: some clean-up re get_address_history vs db.get_addr_history
...
note: tests needed changing due to behavioural change in wallet.get_receiving_address()
Previously wallet.get_receiving_address used wallet.db.get_addr_history,
now it (indirectly) uses wallet.get_address_history, which now also considers local txns.
6 years ago
SomberNight
8dbbc21aff
wallet: better (outgoing) invoice "paid" detection
...
- no more passing around "invoice" in GUIs, invoice "paid" detection is now handled by wallet logic
- a tx can now pay for multiple invoices
- an invoice can now be paid by multiple txs (through partial payments)
- new data structure in storage: prevouts_by_scripthash
- type: scripthash -> set of (outpoint, value)
- also, storage upgrade to build this for existing wallets
6 years ago
SomberNight
557987d4eb
add/fix some open_channel related type hints
6 years ago
ThomasV
06589df812
simplify add_transaction
6 years ago
SomberNight
6b195437ed
wallet: "future" txns num conf is now negative
...
flipped the sign so that TxMinedInfo.conf can be consistently used in inequalities
6 years ago
SomberNight
8a7c3447b3
tx dialog: try harder to show fee
6 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
SomberNight
6a32187f01
qt: fix address dialog
...
(was showing full history, not just for addr)
6 years ago
ThomasV
7b828359c6
simplify get_tx_fee
6 years ago
SomberNight
482605edbb
wallet: organise get_tx_fee. store calculated fees. storage version 19.
6 years ago
SomberNight
b138fff9a5
wallet: txi/txo small clean-up
6 years ago
SomberNight
241873f0a4
address_synchronizer.get_history now returns HistoryItem(NamedTuple)s
6 years ago
ThomasV
65b88dca86
return fees in history, show them in kivy GUI
6 years ago
SomberNight
d1dea9343e
wallet: address_is_old minor clean-up
...
also, synchronize was defined twice in AddressSynchronizer
6 years ago
SomberNight
abde8ff169
wallet: fix maturity off-by-one
...
based on Electron-Cash/Electron-Cash@c70957eb131ccb780726c8d01bcbb914df5b9644
6 years ago
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
...
as it seems every consumer wants to know this and has its own hacks to
figure it out
6 years ago
ThomasV
7a51f034e4
add future transactions to address synchronizer
6 years ago
Janus
261fefb6f3
lnwatcher rebased
6 years ago
SomberNight
66817d41f9
lnwatcher improvements
...
- only try sweeping csv-locked to_local if past timelock
- check if outputs are already spent
- no need to keep watching channels for which all outputs are spent and mined deep
6 years ago
SomberNight
7ba3f2d54d
calc short_channel_id after funding locked
6 years ago
Janus
9617447a0f
lnbase: add lnbase_test
6 years ago
SomberNight
e431a07258
fix prev: conditional import / type hint failure
7 years ago
SomberNight
d293b2e038
wallet: follow-up prev
7 years ago
ThomasV
37e7add776
Do not pass storage to address_synchronizer
7 years ago
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
...
method should make sure prevout_n is str...
also wrote failing test
7 years ago
SomberNight
53d189fc7a
storage: fix some madness about get_data_ref() and put() interacting badly
...
previously load_transactions() had to be called before upgrade();
now we reverse this order.
to reproduce/illustrate issue, before this commit:
try running convert_version_17 and convert_version_18
(e.g. see testcase test_upgrade_from_client_2_9_3_old_seeded_with_realistic_history)
and then in qt console:
>> wallet.storage.db.get_data_ref('spent_outpoints') == wallet.storage.db.spent_outpoints
False
>> wallet.storage.db.get_data_ref('verified_tx3') == wallet.storage.db.verified_tx
False
7 years ago
SomberNight
0e6cf153d7
synchronizer: show progress in GUI
7 years ago
SomberNight
06cff9ac10
logging: fix call with multiple args
7 years ago
SomberNight
3385a94753
logging: basics
7 years ago
SomberNight
bca6ad5241
verifier: fix logic bug. after reorg, some verifs were not undone
...
after a reorg, in a many fork/orphan chains scenario,
we would sometimes not undo SPV for enough blocks
functions in blockchain.py somewhat based on kyuupichan/bitcoinX@5126bd15ef0c9ba36e17a455513452ebed7b2328
7 years ago
SomberNight
752c518bdc
add option to freeze individual UTXOs
...
based on cculianu's work in Electron-Cash/Electron-Cash@fd910cffc88570f82613fefeb932966cde0246ad
7 years ago
SomberNight
cd40f2c9b7
trivial wallet clean-up
7 years ago
SomberNight
2abc4f6334
wallet: cache get_addr_balance
...
notably this makes get_history faster; as 40% of the time is spent in
get_addr_balance (without the cache)
7 years ago
SomberNight
514d0ae958
wallet: towards restoring previous performance 2
7 years ago
SomberNight
ef1330df5d
[trivial] use namedtuple field by name
7 years ago
SomberNight
2ad73050b3
wallet: towards restoring previous performance
7 years ago
ThomasV
1e519f2dd0
json_db: make get operations threadsafe
7 years ago
ThomasV
d74f0c0947
storage_db: fix tests, add modified flag to db class
7 years ago