Commit graph

111 commits

Author SHA1 Message Date
Janus
3efd8dedb6
lnbase: mark initialized later, add tests, etc
- consistent node_id sorting
- require OPTION_DATA_LOSS_PROTECT and test it
2018-11-05 20:24:09 +01:00
Janus
838b79f7b8
lnbase: do not assert only one htlc in commitment 2018-11-05 20:24:08 +01:00
Janus
1dc9e062df
lightning channels reserves: use pretty balance in Qt, fix bugs, add tests 2018-11-05 20:24:08 +01:00
ThomasV
f8fd131d01
use WaitingDialog to close channels 2018-11-05 20:24:07 +01:00
ThomasV
b38e25844b
add close_channel method to peer 2018-11-05 20:24:07 +01:00
ThomasV
82e1c5228a
fix typo 2018-11-05 20:24:06 +01:00
ThomasV
304e4fd537
lnbase: self.channel_reestablished is not a queue 2018-11-05 20:24:05 +01:00
Janus
36d03f4762
lightning channel reserves 2018-11-05 20:24:05 +01:00
ThomasV
0890a2beaa
lnbase: call save_channel in revoke and receive_revoke 2018-11-05 20:24:04 +01:00
Janus
3afb9c8ca3
redeem htlc outputs of our local commitment transaction back to wallet 2018-11-05 20:24:02 +01:00
SomberNight
5c8b5a0b7c
some more type annotations that needed conditional imports 2018-11-05 20:24:02 +01:00
SomberNight
9c7140f383
better handling of channel updates for private channels 2018-11-05 20:24:01 +01:00
SomberNight
80798061c3
lnbase: when opening channel, test if we have enough balance first
and make sure we don't try to create the funding txn from local UTXOs
2018-11-05 20:23:59 +01:00
SomberNight
f1ea73a2c6
start failing htlcs 2018-11-05 20:23:58 +01:00
SomberNight
5493296d81
unify hardcoded regtest fee 2018-11-05 20:23:57 +01:00
ThomasV
dd957e1836
Qt gui: show messages about payment outcome 2018-11-05 20:23:56 +01:00
ThomasV
784b4a9d65
encapsulate get_invoice in lnworker 2018-11-05 20:23:56 +01:00
ThomasV
1aa624c96c
make on_update_add_htlc async 2018-11-05 20:23:55 +01:00
SomberNight
d5f83c827a
follow-up prev 2018-11-05 20:23:55 +01:00
SomberNight
1de6e7f673
fix multi-hop payments 2018-11-05 20:23:54 +01:00
ThomasV
cb0cebba0c
follow-up 3460ba738e 2018-11-05 20:23:53 +01:00
ThomasV
8ed199b87a
revert rbf on funding tx 2018-11-05 20:23:52 +01:00
SomberNight
ab61a7592e
lnbase: fix peer clean-up 2018-11-05 20:23:51 +01:00
ThomasV
3c1fbc2247
funding tx: use fees from config and set rbf 2018-11-05 20:23:50 +01:00
SomberNight
2f9e3067ff
clean-up Peer init 2018-11-05 20:23:50 +01:00
SomberNight
3d89cc355d
if payment fails with UPDATE onion error, also utilise channel_update for private channels 2018-11-05 20:23:49 +01:00
Janus
34dff98919
ln: add lightning_listen config option 2018-11-05 20:23:49 +01:00
ThomasV
7091e59df3
follow-up prev commit: channel_flags, message_flags, htlc_maximum_msat 2018-11-05 20:23:47 +01:00
SomberNight
f29a88147a
lnbase: typo in on_channel_reestablish 2018-11-05 20:23:46 +01:00
ThomasV
ecb6922456
lnrouter: filter out unsuitable channels 2018-11-05 20:23:45 +01:00
ThomasV
560a8e99ac
fix tests (follow-up previous commit) 2018-11-05 20:23:44 +01:00
ThomasV
0e3e43f522
move transport code to its own file 2018-11-05 20:23:43 +01:00
Janus
da7f731b93
lnbase: split out BOLT-08 (Noise) implementation 2018-11-05 20:23:42 +01:00
SomberNight
dc43341717
rebase follow-up 2018-11-05 20:19:04 +01:00
Janus
04741512ce
lnbase: resend revoke_and_ack if necessary 2018-11-05 20:19:04 +01:00
Janus
786ead4d83
rebase fixup: use new broadcast_transaction API 2018-11-05 20:19:03 +01:00
Janus
b21fb16803
lnbase: use 45000 feerate on regtest for eclair compatibility 2018-11-05 20:19:02 +01:00
Janus
12bc0a75f8
rename lnhtlc->lnchan, HTLCStateMachine->Channel 2018-11-05 20:19:01 +01:00
Janus
e1f37a17f3
lnhtlc: only store feerate once, don't store heights since we do not roll back 2018-11-05 20:19:00 +01:00
Janus
ab2ca4d018
lnhtlc: merge config and state, remove unnecessary properties 2018-11-05 20:19:00 +01:00
Janus
ab991ce207
lnhtlc: remove lookup_htlc, use heterogeneously typed lists 2018-11-05 20:18:59 +01:00
ThomasV
a8969d8822
fix previous commit 2018-11-05 20:18:58 +01:00
ThomasV
639e4ae8ca
follow-up 1c8a4bcfa497b117e4511c2f108dbca8a1adb793 2018-11-05 20:18:58 +01:00
SomberNight
048d9c7332
lnbase: handle some error codes re htlc failures ('UPDATE' flag) 2018-11-05 20:18:57 +01:00
SomberNight
93134c49c5
lnonion: use IntEnum and IntFlag for failure codes 2018-11-05 20:18:57 +01:00
SomberNight
a3dabbf889
handle failing htlc after restart 2018-11-05 20:18:56 +01:00
SomberNight
ea6406c5be
clean up local/global features 2018-11-05 20:18:56 +01:00
SomberNight
1479a50eb7
on_channel_reestablish: try to get remote to force close channel if out-of-sync.
see ACINQ/eclair#727 and lightningnetwork/lnd#1904
2018-11-05 20:18:55 +01:00
SomberNight
9578bfca12
on_update_fail_htlc: don't send commitment without changes
c-lightning was force-closing channels with us: "[lnbase:127.0.0.1] error commit_sig with no changes"
2018-11-05 20:18:55 +01:00
SomberNight
bea5fd8ba8
simplify ChannelDB.on_channel_update 2018-11-05 20:18:54 +01:00