Commit graph

11175 commits

Author SHA1 Message Date
Janus
601356f5d1 lnbase: use 45000 feerate on regtest for eclair compatibility 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
b26dc66567 lnhtlc: only store feerate once, don't store heights since we do not roll back 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
Janus
1d4c113a35 lnhtlc: remove lookup_htlc, use heterogeneously typed lists 2019-08-20 09:03:10 +02:00
Janus
699368b0b7 lnhtlc: save settled htlc amounts separately 2019-08-20 09:03:10 +02:00
Janus
18d06dd6b4 qt channels_list: use repr() and not str() for exceptions 2019-08-20 09:03:10 +02:00
ThomasV
d439b3c308 fix previous commit 2019-08-20 09:03:10 +02:00
ThomasV
1ebd1baebf follow-up 1c8a4bcfa497b117e4511c2f108dbca8a1adb793 2019-08-20 09:03:10 +02:00
SomberNight
8d4a5bd1d7 lnbase: handle some error codes re htlc failures ('UPDATE' flag) 2019-08-20 09:03:10 +02:00
SomberNight
a8ace7ef4f lnonion: use IntEnum and IntFlag for failure codes 2019-08-20 09:03:10 +02:00
SomberNight
864efa029b handle failing htlc after restart 2019-08-20 09:03:10 +02:00
SomberNight
eced61123d clean up local/global features 2019-08-20 09:03:10 +02:00
SomberNight
4d32478f30 on_channel_reestablish: try to get remote to force close channel if out-of-sync.
see ACINQ/eclair#727 and lightningnetwork/lnd#1904
2019-08-20 09:03:10 +02:00
SomberNight
1946254ef2 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"
2019-08-20 09:03:10 +02:00
SomberNight
bf25d765d9 simplify ChannelDB.on_channel_update 2019-08-20 09:03:10 +02:00
SomberNight
c1473ca97d travis: don't build binaries on ln branch 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
SomberNight
53802ba382 lnaddr: clean up imports 2019-08-20 09:03:10 +02:00
ThomasV
c1b34dafe2 follow-up previous commit 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
242ab5ae56 lightning: fix tests 2019-08-20 09:03:10 +02:00
SomberNight
5fbadafdb1 follow-up lnwatcher changes 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
6b9de278d4 aiosafe: define user visible exception class 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
72eb179c7a fix race between lnwatcher/lnworker
channels were sometimes not getting re-established
2019-08-20 09:03:10 +02:00
SomberNight
d44afd9633 fix tests 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
5859054095 fix lnwatcher for channels initiated by remote 2019-08-20 09:03:10 +02:00
SomberNight
fb8deecb57 lnutil: missing import 2019-08-20 09:03:10 +02:00
Janus
c5b7deac6b lnhtlc: don't save FeeUpdates to disk, only keep FeeUpdate in memory while in progress 2019-08-20 09:03:10 +02:00
Janus
8bd6dc2425 ln: fix opening of channels (NameErrors) 2019-08-20 09:03:10 +02:00
Janus
bdf36ac649 lnbase: update gui after accomodating channel opening request 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
b18a17ef79 lnchannelverifier: (minor) use named fields of namedtuple 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
1a7b06b690 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
2019-08-20 09:03:10 +02:00
Janus
646881f437 lnworker.pay(): lightning-integration support 2019-08-20 09:03:10 +02:00
Janus
a071aafcc7 lnhtlc: generalize balance/pending_commitment code over htlc direction 2019-08-20 09:03:10 +02:00