Commit graph

79 commits

Author SHA1 Message Date
Janus
0ea87278fb move force_close_channel to lnbase, test it, add FORCE_CLOSING state 2019-08-20 09:03:11 +02:00
SomberNight
c0ae7b5534 after rebase clean-up 2019-08-20 09:03:10 +02:00
Janus
7e76e82152 test_lnbase: add test that pays to another local electrum 2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe add licence headers to more files 2019-08-20 09:03:10 +02:00
Janus
a42c1067ab lnworker: fix listchannels 2019-08-20 09:03:10 +02:00
ThomasV
eb4e6b2e54 use WaitingDialog to close channels 2019-08-20 09:03:10 +02:00
ThomasV
70dbd8e672 add close_channel method to peer 2019-08-20 09:03:10 +02:00
SomberNight
54edc9488a lnworker: store invoices based on payment_hash 2019-08-20 09:03:10 +02:00
SomberNight
f70e679aba some more type annotations that needed conditional imports 2019-08-20 09:03:10 +02:00
SomberNight
2364de930b lnrouter: run Dijkstra in reverse direction 2019-08-20 09:03:10 +02:00
SomberNight
7edbd5682a fix confusion re max path length 2019-08-20 09:03:10 +02:00
SomberNight
2fafd01945 protect against getting robbed through routing fees 2019-08-20 09:03:10 +02:00
SomberNight
d511ecdc00 start failing htlcs 2019-08-20 09:03:10 +02:00
SomberNight
dfe61e15c3 invoice 'r' field fallback: change cltv to 1 2019-08-20 09:03:10 +02:00
ThomasV
02c39a950f encapsulate get_invoice in lnworker 2019-08-20 09:03:10 +02:00
SomberNight
e6a0b641d5 lnaddr: encode min_final_cltv into invoice 2019-08-20 09:03:10 +02:00
SomberNight
384fd665b3 log if no invoice has no routing hints 2019-08-20 09:03:10 +02:00
ThomasV
87cc312d1e improve suggest_peers; add htlcs to list_channels. 2019-08-20 09:03:10 +02:00
SomberNight
9de6028fb5 clean-up Peer init 2019-08-20 09:03:10 +02:00
SomberNight
25c2657680 if channel_update for our channel is missing, fill invoice with zeroes 2019-08-20 09:03:10 +02:00
SomberNight
2e5552816c if payment fails with UPDATE onion error, also utilise channel_update for private channels 2019-08-20 09:03:10 +02:00
Janus
962f70c7da ln: add lightning_listen config option 2019-08-20 09:03:10 +02:00
SomberNight
ff0aa90ddf lnworker: make add_peer async 2019-08-20 09:03:10 +02:00
SomberNight
a91e244a05 path finding: minor clean-up 2019-08-20 09:03:10 +02:00
ThomasV
9a59ffaf44 lnrouter: filter out unsuitable channels 2019-08-20 09:03:10 +02:00
ThomasV
445252284f move transport code to its own file 2019-08-20 09:03:10 +02:00
ThomasV
910e85ec01 future and callback are not needed here 2019-08-20 09:03:10 +02:00
Janus
71afa3cc70 lnbase: split out BOLT-08 (Noise) implementation 2019-08-20 09:03:10 +02:00
ThomasV
626d09b358 add 'recḱless' option to allow using lightning on mainnet 2019-08-20 09:03:10 +02:00
SomberNight
48252318b8 rebase follow-up 2019-08-20 09:03:10 +02:00
ThomasV
46cf18ce5f open_channel: improved success message 2019-08-20 09:03:10 +02:00
ThomasV
6efe5db0d0 run open_channel in a WaitingDialog 2019-08-20 09:03:10 +02:00
Janus
1763d02b05 rename lnhtlc->lnchan, HTLCStateMachine->Channel 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
SomberNight
a06b49ae40 when paying and there are multiple 'r' hints, use one at random 2019-08-20 09:03:10 +02:00
SomberNight
97393d05aa use 'r' field in invoice when making payments (routing hints) 2019-08-20 09:03:10 +02:00
SomberNight
029ec5a5ab make our channels private, and put routing hints in invoices we create 2019-08-20 09:03:10 +02:00
SomberNight
09c3e52e62 lnworker: fix race
sometimes a reestablished channel would not get marked "open"
2019-08-20 09:03:10 +02:00
ThomasV
4441233596 get rid of callbacks in lnwatcher, use network events instead 2019-08-20 09:03:10 +02:00
ThomasV
6e5b36e661 lnwatcher simplification: remove ctn tests and pubkeys 2019-08-20 09:03:10 +02:00
ThomasV
9a88b5605a add more fields to list_channels 2019-08-20 09:03:10 +02:00
ThomasV
6f3c2b30ed lnbase: propagate error messages received in on_error to their relevant coroutines 2019-08-20 09:03:10 +02:00
ThomasV
11c3ca281c create sweep transaction outside of lnwatcher 2019-08-20 09:03:10 +02:00
SomberNight
707c7d569d lnbase: Peer handles its own disconnection instead of lnworker 2019-08-20 09:03:10 +02:00
SomberNight
f3dd7ce615 follow-up prev: avoid storage key collision with old 'lightning_privkey' 2019-08-20 09:03:10 +02:00
SomberNight
17457327ef make key derivation reasonable
no more hardcoded secrets, no more key-reuse
2019-08-20 09:03:10 +02:00
Janus
0405f0d9ad accept channel opening requests initiated by remote 2019-08-20 09:03:10 +02:00
SomberNight
c430b39b7d fix lnworker.choose_preferred_address 2019-08-20 09:03:10 +02:00
Janus
139f773c2e new network API: use broadcast_transaction with run_from_other_thread 2019-08-20 09:03:10 +02:00
Janus
646881f437 lnworker.pay(): lightning-integration support 2019-08-20 09:03:10 +02:00