Commit graph

2004 commits

Author SHA1 Message Date
SomberNight
fda6fb6521 lnhtlc: handle fails asymmetrically 2019-08-20 09:03:11 +02:00
SomberNight
f47519bdf3 lnchan: make_commitment and balance (follow-up prev)
"balance(self, subject, ctn=None)" is underspecified.
whose balance? whose commitment transaction?
this lead to issues...
2019-08-20 09:03:11 +02:00
SomberNight
8632f027da lnhtlc: small clean-up / docstrings 2019-08-20 09:03:11 +02:00
SomberNight
268f05c60c lnhtlc: add type hints 2019-08-20 09:03:11 +02:00
ThomasV
796f199a5b follow-up prev commit 2019-08-20 09:03:11 +02:00
ThomasV
a6469904ee fix verify_sig_for_channel_update: use raw message 2019-08-20 09:03:11 +02:00
ThomasV
407114d3cc lnpeer:
- disable option data_loss_protect
 - disable query_short_channel_ids
 - increase timeouts in pay
2019-08-20 09:03:11 +02:00
ThomasV
e2182f5846 lnwatcher fixes 2019-08-20 09:03:11 +02:00
ThomasV
f0ac81419c increase timeout in open_channel 2019-08-20 09:03:11 +02:00
ThomasV
5eab60621d lnpeer:
- send data_loss_protect fields with channel_reestablish
 - close connection if we receive an unknown channel_reestablish
 - log all exceptions that make us close a connection
 - formatting
2019-08-20 09:03:11 +02:00
ThomasV
b76728d459 lnrouter: fix get_last_good_address: one_or_none -> all 2019-08-20 09:03:11 +02:00
ThomasV
9983578df0 lightning tx: remove amount from label 2019-08-20 09:03:11 +02:00
ThomasV
93e8d4f953 channel_db: fix timestamp_range, reduce verbosity 2019-08-20 09:03:11 +02:00
ThomasV
aa398993cf lnrouter fixes:
- use gossip_queries_req instead of initial_routing_sync
 - add connected nodes to recent peers only after successful init
 - derive timestamp used with gossip_timestamp_filter from channel_db
 - fix query_short_channel_ids:
     1. channel IDs must be sorted with zlib
     2. limit request to 100
     3. do not abuse this to request node_announcements; it is fine not to have all nodes.
 - fix get_recent_peers:
     1. do not set last_connected_date to 'now' if we never connected a node
     2. sql query was misconstructed and was returning only one peer
 - populate FALLBACK_NODE_LIST_MAINNET with nodes that have the requested flags
2019-08-20 09:03:11 +02:00
ThomasV
e7888a50be fix sql conflicts in lnrouter 2019-08-20 09:03:11 +02:00
ThomasV
eae8f1a139 gui: show only initialized peers 2019-08-20 09:03:11 +02:00
ThomasV
f5eb369fb7 lnpeer: spawn wait_for(self.initialized) to kill the TaskGroup if it times out 2019-08-20 09:03:11 +02:00
ThomasV
2c80996fbf lnrouter: fix primary key conflict in Policy update 2019-08-20 09:03:11 +02:00
ThomasV
e7218d798d add get_channel_ctx to CLI, for testing breaches 2019-08-20 09:03:11 +02:00
ThomasV
a698344136 cleanup tests that use regtest:
- separate setup from execution
 - install bitcoind and electrumx in travis
 - use the same framework for lnwatcher and forwarding
 - make tests runnable locally
2019-08-20 09:03:11 +02:00
ThomasV
023d4026b9 fix local_index in channel _shutdown 2019-08-20 09:03:11 +02:00
ThomasV
3abe30e9d8 basic watchtower synchronization 2019-08-20 09:03:11 +02:00
ThomasV
c155293166 follow-up variable renaming 2019-08-20 09:03:11 +02:00
ThomasV
5148397a75 test forwarding 2019-08-20 09:03:11 +02:00
ThomasV
90c42c7f1b fix icons in receive tab 2019-08-20 09:03:11 +02:00
ThomasV
ec97d623a5 force-close channel if unfulfilled htlc is close to cltv expiry 2019-08-20 09:03:11 +02:00
ThomasV
4dc6c6c82e fix tests (follow up prev commit) 2019-08-20 09:03:11 +02:00
ThomasV
8d77a7ecd8 save timestamps in htlc log 2019-08-20 09:03:11 +02:00
ThomasV
ecd9508233 follow-up previous commit 2019-08-20 09:03:11 +02:00
ThomasV
a7d37b72db factorize channel opening code into chan.open_with_first_pcp 2019-08-20 09:03:11 +02:00
ThomasV
c3f6351922 simplify points, remove side-effect in reestablish_channel 2019-08-20 09:03:11 +02:00
ThomasV
b5fd27c64c fix local/remote confusion in reestablish_channel 2019-08-20 09:03:11 +02:00
ThomasV
82491ff083 do not duplicate ctn in channel log and config 2019-08-20 09:03:11 +02:00
ThomasV
8d28188d24 lnhtlc: remove unused field in log 2019-08-20 09:03:11 +02:00
ThomasV
51466930f2 reestablish_peers_and_channels: spawn tasks in for loop 2019-08-20 09:03:11 +02:00
ThomasV
38f1436d78 post rebase fixes 2019-08-20 09:03:11 +02:00
ThomasV
b215d6c4b7 lnhtlc: rename ctnheights -> ctn 2019-08-20 09:03:11 +02:00
ThomasV
02d013421a lnwatcher: store transactions as binary 2019-08-20 09:03:11 +02:00
ThomasV
d8e9a9a49e create parent class for sql databases 2019-08-20 09:03:11 +02:00
ThomasV
b861e2e955 lnwatcher: save sweepstore in sqlite database 2019-08-20 09:03:11 +02:00
ThomasV
bfdf0a7e88 start asyncio loop in test_lnrouter and test_lnpeer 2019-08-20 09:03:11 +02:00
ThomasV
29afe52b4c sqlite: do not use scoped_session 2019-08-20 09:03:11 +02:00
ThomasV
436c313790 follow-up previous commit 2019-08-20 09:03:11 +02:00
ThomasV
46aa5c1958 lnrouter: perform SQL requests in a separate thread. persist database. 2019-08-20 09:03:11 +02:00
ThomasV
9f188c087c Flatten the structure of lnrouter, so that DBSession is not used outside of ChannelDB 2019-08-20 09:03:11 +02:00
Janus
95a2174789 sqlite in lnrouter: lnpeer: introduce _gossip_loop for gossip handling separated from message handling 2019-08-20 09:03:11 +02:00
Janus
3442e51fac sqlite in lnrouter: remove useless InDB suffix 2019-08-20 09:03:11 +02:00
Janus
945e1dc4ee sqlite in lnrouter: request missing channel_announcements and node_announcements 2019-08-20 09:03:11 +02:00
Janus
d2d67f1fe1 sqlite in lnrouter: avoid exceptions on shutdown 2019-08-20 09:03:11 +02:00
Janus
dd7c4b3bab sqlite in lnrouter 2019-08-20 09:03:11 +02:00