Commit graph

82 commits

Author SHA1 Message Date
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
SomberNight
6a32187f01
qt: fix address dialog
(was showing full history, not just for addr)
2019-09-21 18:48:44 +02:00
ThomasV
7b828359c6 simplify get_tx_fee 2019-09-12 12:26:49 +02:00
SomberNight
482605edbb wallet: organise get_tx_fee. store calculated fees. storage version 19. 2019-09-12 08:59:27 +02:00
SomberNight
b138fff9a5
wallet: txi/txo small clean-up 2019-09-12 04:07:17 +02:00
SomberNight
241873f0a4
address_synchronizer.get_history now returns HistoryItem(NamedTuple)s 2019-09-12 04:06:51 +02:00
ThomasV
65b88dca86 return fees in history, show them in kivy GUI 2019-09-11 17:49:40 +02:00
SomberNight
d1dea9343e
wallet: address_is_old minor clean-up
also, synchronize was defined twice in AddressSynchronizer
2019-09-09 01:34:29 +02:00
SomberNight
abde8ff169
wallet: fix maturity off-by-one
based on Electron-Cash/Electron-Cash@c70957eb13
2019-09-08 18:26:04 +02:00
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
2019-09-03 14:34:10 +02:00
ThomasV
7a51f034e4 add future transactions to address synchronizer 2019-08-20 09:03:11 +02:00
Janus
261fefb6f3 lnwatcher rebased 2019-08-20 09:03:10 +02:00
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
2019-08-20 09:03:10 +02:00
SomberNight
7ba3f2d54d calc short_channel_id after funding locked 2019-08-20 09:03:09 +02:00
Janus
9617447a0f lnbase: add lnbase_test 2019-08-20 09:03:09 +02:00
SomberNight
e431a07258
fix prev: conditional import / type hint failure 2019-07-03 13:56:11 +02:00
SomberNight
d293b2e038
wallet: follow-up prev 2019-07-03 13:40:42 +02:00
ThomasV
37e7add776 Do not pass storage to address_synchronizer 2019-07-03 10:46:30 +02:00
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
method should make sure prevout_n is str...
also wrote failing test
2019-06-15 03:51:11 +02:00
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
2019-06-06 19:49:06 +02:00
SomberNight
0e6cf153d7
synchronizer: show progress in GUI 2019-05-07 17:58:06 +02:00
SomberNight
06cff9ac10
logging: fix call with multiple args 2019-05-06 23:03:19 +02:00
SomberNight
3385a94753
logging: basics 2019-05-02 15:19:03 +02:00
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@5126bd15ef
2019-03-26 21:01:43 +01:00
SomberNight
752c518bdc
add option to freeze individual UTXOs
based on cculianu's work in Electron-Cash/Electron-Cash@fd910cffc8
2019-03-11 18:46:29 +01:00
SomberNight
cd40f2c9b7
trivial wallet clean-up 2019-03-10 18:47:23 +01:00
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)
2019-03-04 22:19:33 +01:00
SomberNight
514d0ae958
wallet: towards restoring previous performance 2 2019-03-04 18:16:48 +01:00
SomberNight
ef1330df5d
[trivial] use namedtuple field by name 2019-03-03 17:34:03 +01:00
SomberNight
2ad73050b3
wallet: towards restoring previous performance 2019-03-01 17:59:22 +01:00
ThomasV
1e519f2dd0 json_db: make get operations threadsafe 2019-02-28 15:47:42 +01:00
ThomasV
d74f0c0947 storage_db: fix tests, add modified flag to db class 2019-02-28 12:09:36 +01:00
SomberNight
4b36114d0d small fixups 2019-02-28 09:02:58 +01:00
ThomasV
791e680a96 abstract database away from wallet and address_synchronizer 2019-02-28 09:02:58 +01:00
SomberNight
40bf049c82
commands: introduce 'removelocaltx'
see #5137
2019-02-20 18:01:43 +01:00
SomberNight
8e6904c7b7
wallet: default to get_addresses() in get_history()
get_addresses() is a superset of history.keys()
(was missing some local transactions in the output of get_history())
2019-02-20 17:52:43 +01:00
SomberNight
9bbea9bf2f
wallet: implement wait_for_address_history_to_change API 2019-01-30 21:30:25 +01:00
SomberNight
7ffd928e80
wallet: add comment 2019-01-17 17:19:08 +01:00
SomberNight
c9482b5ea2
fix prev 2018-12-07 20:59:19 +01:00
SomberNight
c017f788ac
wallet: TxMinedInfo (merged TxMinedStatus and VerifiedTxInfo) 2018-12-07 20:47:28 +01:00
SomberNight
960855d0aa
wallet history fees: only calculate fees when exporting history
it's expensive, and it slows down startup of large wallets a lot
2018-12-04 16:17:22 +01:00
SomberNight
e12af33626
wallet: cache more in get_tx_fee
closes #4879
2018-11-28 12:35:53 +01:00
SomberNight
5376d37c24
history export: include tx fee
closes #3504
2018-11-18 16:46:07 +01:00
SomberNight
71ac3bb305
RBF batching: some fixes 2018-11-09 17:56:42 +01:00
ThomasV
2b8d801b36 if possible, batch new transaction with existing rbf transaction 2018-11-09 16:33:29 +01:00
SomberNight
99d18a48f2
types: make some import conditional 2018-10-25 23:01:53 +02:00
SomberNight
81cc20039e
more type annotations in core lib 2018-10-22 16:41:25 +02:00
SomberNight
10a4c7a6ed
wallet.mktx: add new args: rbf, nonlocal_only
used on lightning branch
2018-10-19 20:48:48 +02:00
SomberNight
e3b372946a
rm aiosafe decorator. instead: log_exceptions and ignore_exceptions 2018-10-12 18:36:48 +02:00
SomberNight
02f108d927
restructure synchronizer
fix CLI notify cmd. fix merchant websockets.
2018-10-03 17:13:46 +02:00