Commit graph

10178 commits

Author SHA1 Message Date
Janus
36d03f4762
lightning channel reserves 2018-11-05 20:24:05 +01:00
SomberNight
53027d6b2f
lnworker: store invoices based on payment_hash 2018-11-05 20:24:04 +01:00
ThomasV
0890a2beaa
lnbase: call save_channel in revoke and receive_revoke 2018-11-05 20:24:04 +01:00
Janus
94b0631ccc
fix co-op close 2018-11-05 20:24:04 +01:00
Janus
c34ce01f3b
follow-up redeeming of local outgoing htlc outputs, fix tests 2018-11-05 20:24:03 +01:00
SomberNight
5ce88014c8
lnutil.make_funding_input: don't return payment pubkeys
order depends on who is initiator anyway
2018-11-05 20:24:03 +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
c60715d55c
lnchan: set diagnostic_name
previously was only set for tests
2018-11-05 20:24:01 +01:00
SomberNight
9c7140f383
better handling of channel updates for private channels 2018-11-05 20:24:01 +01:00
SomberNight
d83b4a8c88
lnrouter: can_pay for own channels should use amount_to_forward 2018-11-05 20:24:00 +01:00
SomberNight
3f53384309
lnrouter: run Dijkstra in reverse direction 2018-11-05 20:24:00 +01:00
SomberNight
78ca70887a
fix confusion re max path length 2018-11-05 20:23:59 +01:00
SomberNight
4fcc766ba5
protect against getting robbed through routing fees 2018-11-05 20:23:59 +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
5538b9bb8a
lnonion: implement error packet construction 2018-11-05 20:23:58 +01:00
SomberNight
1503227bbf
invoice 'r' field fallback: change cltv to 1 2018-11-05 20:23:57 +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
Janus
0b2f539c81
lnchan: add available_to_spend() 2018-11-05 20:23:54 +01:00
Janus
c7ccaabcc2
lnchan: make function for onion_keys decoding/encoding 2018-11-05 20:23:54 +01:00
ThomasV
cb0cebba0c
follow-up 3460ba738e 2018-11-05 20:23:53 +01:00
SomberNight
97d1438f5d
lnaddr: encode min_final_cltv into invoice 2018-11-05 20:23:53 +01:00
SomberNight
66cfcd9feb
log if no invoice has no routing hints 2018-11-05 20:23:52 +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
bcf202c465
improve suggest_peers; add htlcs to list_channels. 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
be6a7e432b
if channel_update for our channel is missing, fill invoice with zeroes 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
SomberNight
763eaec21e
lnrouter: use htlc_maximum_msat 2018-11-05 20:23:48 +01:00
SomberNight
3dad632472
lnworker: make add_peer async 2018-11-05 20:23:48 +01:00
ThomasV
7091e59df3
follow-up prev commit: channel_flags, message_flags, htlc_maximum_msat 2018-11-05 20:23:47 +01:00
ThomasV
1112e72e9d
add htlc_maximum_msat feature (bolt7) 2018-11-05 20:23:47 +01:00
SomberNight
f29a88147a
lnbase: typo in on_channel_reestablish 2018-11-05 20:23:46 +01:00
SomberNight
2d0cabbc5f
path finding: minor clean-up 2018-11-05 20:23:46 +01:00
Janus
e85226a6b3
make function for determining who pays fee 2018-11-05 20:23:46 +01:00
SomberNight
77ce64bc58
fix prev 2018-11-05 20:23:45 +01:00
ThomasV
ecb6922456
lnrouter: filter out unsuitable channels 2018-11-05 20:23:45 +01:00
ThomasV
42ada7ffc4
gather definitions of LN exceptions 2018-11-05 20:23:44 +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
ThomasV
354a4acea5
future and callback are not needed here 2018-11-05 20:23:43 +01:00