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
SomberNight
04edad9984
config: no longer singleton. it is passed to Wallet.__init__
...
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
SomberNight
ce54b5411e
lnhtlc: htlcs_by_direction now returns dict keyed by htlc_id
2019-08-20 09:03:12 +02:00
SomberNight
a27b03be6d
lnhtlc: local update raw messages must not be deleted before acked
...
In recv_rev() previously all unacked_local_updates were deleted
as it was assumed that all of them have been acked at that point by
the revoke_and_ack itself. However this is not necessarily the case:
see new test case.
renamed log['unacked_local_updates'] to log['unacked_local_updates2']
to avoid breaking existing wallet files
2019-08-20 09:03:12 +02:00
SomberNight
107f271e58
move all ctn book-keeping to lnhtlc (from lnchannel)
2019-08-20 09:03:12 +02:00
SomberNight
7431aac5cd
lnhtlc: (fix) was locking in too many updates during commit/revoke
2019-08-20 09:03:12 +02:00
SomberNight
69bffac86a
lnhtlc: fix adding htlc between sending commitment_signed and receiving revoke_and_ack
2019-08-20 09:03:11 +02:00
SomberNight
fda6fb6521
lnhtlc: handle fails asymmetrically
2019-08-20 09:03:11 +02:00
SomberNight
8632f027da
lnhtlc: small clean-up / docstrings
2019-08-20 09:03:11 +02:00
Janus
f618bb4a67
lnhtlc: handle settles like adds (asymmetrical across ctns)
2019-08-20 09:03:11 +02:00
Janus
e56e849505
lnchan refactor
...
- replace undoing logic with new HTLCManager class
- separate SENT/RECEIVED
- move UpdateAddHtlc to lnutil
2019-08-20 09:03:11 +02:00
Janus
1763d02b05
rename lnhtlc->lnchan, HTLCStateMachine->Channel
2019-08-20 09:03:10 +02:00
Janus
b26dc66567
lnhtlc: only store feerate once, don't store heights since we do not roll back
2019-08-20 09:03:10 +02:00
Janus
e8471e483b
lnhtlc: merge config and state, remove unnecessary properties
2019-08-20 09:03:10 +02:00
Janus
1d4c113a35
lnhtlc: remove lookup_htlc, use heterogeneously typed lists
2019-08-20 09:03:10 +02:00
Janus
699368b0b7
lnhtlc: save settled htlc amounts separately
2019-08-20 09:03:10 +02:00
SomberNight
d44afd9633
fix tests
2019-08-20 09:03:10 +02:00
Janus
50b3bc939c
avoid reading from queues concurrently in pay()
2019-08-20 09:03:10 +02:00
Janus
d5d9270d0c
lnhtlc: save logs and feeupdates
2019-08-20 09:03:10 +02:00
Janus
eca5545004
lnhtlc: don't throw away fee updates or htlcs
...
also add inject_fees debug command
2019-08-20 09:03:10 +02:00
Janus
02eca03486
lnhtlc: cleanup and save settled htlcs
2019-08-20 09:03:10 +02:00
Janus
6f5209ef85
lnhtlc: test that sent amount is received
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
Janus
9247da5203
ln: share more code with control path for failed htlc, verify ctx'es
2019-08-20 09:03:10 +02:00
Janus
3c06b3cee1
ln: use START_INDEX instead of 2**48-1
2019-08-20 09:03:10 +02:00
Janus
a841fa3602
ln: save htlc signatures
2019-08-20 09:03:10 +02:00
Janus
9853cc6f31
ln: do not use mSAT accuracy for commitment fees
2019-08-20 09:03:10 +02:00
Janus
66e7b4d250
ln: fundee must commit to fee first
2019-08-20 09:03:10 +02:00
Janus
35adc3231b
lightning: fixup after rebasing on restructured master
2019-08-20 09:03:10 +02:00