Commit graph

39 commits

Author SHA1 Message Date
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
Janus
7cb76fee84
lnhtlc: save settled htlc amounts separately 2018-11-05 20:18:59 +01:00
SomberNight
37ddb89ec1
make our channels private, and put routing hints in invoices we create 2018-11-05 20:18:53 +01:00
ThomasV
1b11fc2f79
lightning: fix tests 2018-11-05 20:18:50 +01:00
ThomasV
6bdd8b87a0
lnwatcher simplification: remove ctn tests and pubkeys 2018-11-05 20:18:50 +01:00
ThomasV
607eda3a29
create sweep transaction outside of lnwatcher 2018-11-05 20:18:48 +01:00
Janus
d2249dc9c3
lnhtlc: don't save FeeUpdates to disk, only keep FeeUpdate in memory while in progress 2018-11-05 20:18:44 +01:00
Janus
11a528c68a
lnhtlc: multiply weight by feerate before rounding
This resolves the error formerly manifested as:
Traceback (most recent call last):
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/packages/jsonrpclib/SimpleJSONRPCServer.py", line 376, in _dispatch
    return func(*params)
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/daemon.py", line 292, in run_cmdline
    result = func(*args, **kwargs)
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/commands.py", line 87, in func_wrapper
    return func(*args, **kwargs)
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/commands.py", line 697, in lnpay
    return f.result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnbase.py", line 887, in pay
    sig_64, htlc_sigs = chan.sign_next_commitment()
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnhtlc.py", line 281, in sign_next_commitment
    htlc_tx = make_htlc_tx_with_open_channel(self, *args)
  File "/home/janus/Skrivebord/lightning-rfc/tools/electrum/electrum/lnutil.py", line 262, in make_htlc_tx_with_open_channel
    commit.txid(), commit.htlc_output_indices[original_htlc_output_index],
KeyError: 0
2018-11-05 20:18:41 +01:00
Janus
e3d7cf7035
lnhtlc: generalize balance/pending_commitment code over htlc direction 2018-11-05 20:18:40 +01:00
Janus
290a54e284
lnhtlc: save settled or failed htlcs 2018-11-05 20:18:38 +01:00
Janus
308eacbdc3
ln fees: avoid resending same fee update before it has been committed to, docs 2018-11-05 20:18:35 +01:00
Janus
2d092a0835
lnhtlc: decrease next_htlc_id counter when removing htlcs when saving 2018-11-05 20:18:34 +01:00
ThomasV
eb8ad3f3a5
simplify syntax 2018-11-05 20:18:33 +01:00
Janus
dfea7ca961
ln: don't save htlcs that are not locked in 2018-11-05 20:18:33 +01:00
Janus
51c34fd089
lnhtlc: bip69 ordering of htlc signatues we generate 2018-11-05 20:18:32 +01:00
Janus
a028af9dec
ln: avoid duplicated htlc filter code, support multiple htlcs better 2018-11-05 20:18:32 +01:00
Janus
0e0f8a7d8f
avoid reading from queues concurrently in pay() 2018-11-05 20:18:31 +01:00
Janus
75feba4b96
keep htlc history in case a htlc fails 2018-11-05 20:18:30 +01:00
Janus
0448db0019
lnhtlc: also check received htlcs when validating commitment sigs 2018-11-05 20:16:13 +01:00
Janus
137bf72602
ln: cooperative close with remote peer initiating 2018-11-05 20:16:13 +01:00
Janus
d79ccb1c4c
lnhtlc: save logs and feeupdates 2018-11-05 20:16:12 +01:00
Janus
48dce17263
lnhtlc: don't throw away fee updates or htlcs
also add inject_fees debug command
2018-11-05 20:16:11 +01:00
Janus
40dc5ed28f
lnhtlc: cleanup and save settled htlcs 2018-11-05 20:16:11 +01:00
Janus
211de74f47
lnhtlc: test that sent amount is received 2018-11-05 20:16:10 +01:00
Janus
d3a1c8ce42
lnwatcher rebased 2018-11-05 20:16:10 +01:00
SomberNight
dea0c7ebbf
qt: pay_lightning_invoice - attempt paying multiple times in case of failure 2018-11-05 20:16:07 +01:00
SomberNight
36ce46ed70
ln onchain fees: use 2 block ETAs with 150 s/b fallback 2018-11-05 20:16:05 +01:00
SomberNight
985d15dc8e
more reliable peer and channel re-establishing 2018-11-05 20:16:04 +01:00
Janus
5011578790
ln: fix forwarded payment fees by removing separation between fee and amount in htlc objects 2018-11-05 20:08:48 +01:00
Janus
d4c00ee986
ln: save htlc signatures 2018-11-05 20:08:47 +01:00
Janus
67c69d7042
special case receiving payment after fee update, fee update injector 2018-11-05 20:08:46 +01:00
Janus
593552b3cb
ln: do not use mSAT accuracy for commitment fees 2018-11-05 20:06:00 +01:00
Janus
cd4d8e0598
ln: fundee must commit to fee first 2018-11-05 20:06:00 +01:00
Janus
d797f4d146
use correct dust limit for their to_local/to_remote outputs 2018-11-05 20:05:58 +01:00
Janus
a058ed3100
ln: initialize genesis with object, fix method name typo, use depth_target_to_fee 2018-11-05 20:05:58 +01:00
ThomasV
67174b9814
encapsulate funding_address_for_channel 2018-11-05 20:05:57 +01:00
Janus
d9208f3245
move channel_state into HTLCStateMachine 2018-11-05 20:05:51 +01:00
Janus
8276d023c2
lightning: fixup after rebasing on restructured master 2018-11-05 20:05:44 +01:00
Renamed from lib/lnhtlc.py (Browse further)