ThomasV
a3bff7476c
run freeze_packages
5 years ago
ThomasV
9cfeadea70
Turn daemon subcommands into RPCs
5 years ago
ThomasV
4397767a5e
minor fix
5 years ago
ThomasV
2e1829bc24
remove jsonrpclib dependency
5 years ago
ThomasV
54257cbcca
Rewrite JsonRPC requests using asyncio.
- commands are async
- the asyncio loop is started and stopped from the main script
- the daemon's main loop runs in the main thread
- use jsonrpcserver and jsonrpcclient instead of jsonrpclib
5 years ago
SomberNight
fa5302bcfb
(trivial) fix type annotation
5 years ago
SomberNight
bce74717a6
lnpeer: in onion errors, handle channel updates both with and w/o type
5 years ago
SomberNight
beeb81e179
lnpeer: use correct failure codes in _maybe_forward_htlc
5 years ago
SomberNight
e54f0fbafa
do not raise BaseException
5 years ago
SomberNight
d955285808
lnrouter/channeldb: small import clean-up
5 years ago
SomberNight
47ee02569a
lnpeer: send own outgoing channel updates to remote peer
5 years ago
SomberNight
f0588846d5
channeldb: also store "message_flags" field for channel updates
this is a breaking change for the db format.
As in comment in diff,
"It would make more sense to store the raw gossip messages in the db."
5 years ago
SomberNight
d229bb4e4d
lnpeer: restore "temp save orphan channel updates" functionality
needed to handle race where remote might send chan_upd too soon
(before we save the short channel id for the channel after it reaches funding locked)
5 years ago
SomberNight
ba431495db
lnworker: fix silent TypeError in _calc_routing_hints_for_invoice
5 years ago
SomberNight
02681c6664
tests: some regtest tests need to mine more blocks to expire CLTVs
as lnutil.MIN_FINAL_CLTV_EXPIRY_FOR_INVOICE was recently bumped
5 years ago
SomberNight
a9295e495c
tests: regtest.sh now uses consistent indentation
5 years ago
SomberNight
6b1810f8dc
commands.py: fix type of "timeout" arg
was str by default
5 years ago
SomberNight
159fe04daf
lnpeer: on_channel_open should not fail on server error
5 years ago
ThomasV
e5286f7598
minor fix: always initialize Commands.lnworker
5 years ago
ThomasV
5e0427392f
Daemon: Replace get_server with request.
This function performs a single RPC, and may raise a DaemonNotRunning exception.
5 years ago
ThomasV
28b1569f28
(trivial) fix getbalance
5 years ago
ThomasV
b81feb6550
daemon: simplify get_fd_or_server
5 years ago
SomberNight
a9239bd40f
lnpeer: shutdown should wait until no HTLCs remain
in either ctx
5 years ago
SomberNight
2e38bcf416
lnpeer: failed htlc error handling ignored length of channel_update
5 years ago
SomberNight
d2d4d19fcb
lnpeer: add a few sanity checks to payment-forwarding (and related)
5 years ago
SomberNight
0973b86925
lnworker: rework "is_dangerous"
"Should channel be closed due to expiring htlcs?"
5 years ago
SomberNight
ce54b5411e
lnhtlc: htlcs_by_direction now returns dict keyed by htlc_id
5 years ago
ThomasV
8e2ebddc0b
add jsonrpcserver/jsonrpcclient to requirements
5 years ago
ThomasV
b2f61bdc06
use aiohttp + jsonrpcserver in watchtower
5 years ago
ThomasV
de29fe6930
remove unused import
5 years ago
SomberNight
8ad25b3a52
lnpeer: make sure forwarding is disabled by default
5 years ago
SomberNight
a27b03be6d
lnhtlc: local update raw messages must not be deleted before acked
In recv_rev() previously all unacked_local_updates were deleted
as it was assumed that all of them have been acked at that point by
the revoke_and_ack itself. However this is not necessarily the case:
see new test case.
renamed log['unacked_local_updates'] to log['unacked_local_updates2']
to avoid breaking existing wallet files
5 years ago
SomberNight
4fc9f243f7
lnpeer: reestablish_channel - always replay unacked local updates
Even if we haven't signed them yet (did not send commitment_signed).
Alternatively, if they are not yet signed, we could discard them here,
like we do already for remote updates above (chan.hm.discard_unsigned_remote_updates).
One of these two options must be done, and before this commit we were not doing either.
5 years ago
ThomasV
98a1c9268a
qt: do not show paid requests
5 years ago
ThomasV
bd5c83e906
fix race condition with channel_timestamps
5 years ago
ThomasV
b493219829
require data loss protect
5 years ago
ThomasV
9f8e2c689e
test funding_txn_minimum_depth, show it in GUI
5 years ago
ThomasV
bbec1dceda
lnpeer: fix and simplify tests in maybe_send_commitment
5 years ago
ThomasV
39bae1c7cf
channel_db: load_data should load node_info
5 years ago
ThomasV
46c2d7821f
kivy: show pending requests in receive tab instead of dialog
5 years ago
ThomasV
f8038d024b
kivy: lnpay_thread
5 years ago
ThomasV
9e78fdbf71
qt gui: simplify signals
5 years ago
ThomasV
e584a7451c
simplify tx history: do not use separate columns for lightning
5 years ago
SomberNight
80c52d4808
simple_config.estimate_fee: make sure method never fails
code in lnsweep was already assuming this
5 years ago
SomberNight
7f1b456b93
lnhtlc.discard_unsigned_remote_updates: fix edge case
5 years ago
SomberNight
bb63bd98fb
lnpeer: should not mark channel as OPEN if reestablish did not complete
5 years ago
SomberNight
940fc86749
lnpeer: reestablish_channel - fix data_loss_protect edge case
5 years ago
SomberNight
107f271e58
move all ctn book-keeping to lnhtlc (from lnchannel)
5 years ago
SomberNight
44761972cb
lnchannel: ctx output-ordering: identical htlcs are ordered by CLTV
5 years ago
SomberNight
b1f606eaed
lnchannel: start using "latest" and "next" instead of "current" and "pending"
"current" used to be "oldest_unrevoked"; and pending was "oldest_unrevoked + 1"
but this was very confusing...
so now we have "oldest_unrevoked", "latest", and "next"
where "next" is "latest + 1"
"oldest_unrevoked" and "latest" are either the same or are offset by 1
(but caller should know which one they need)
rm "got_sig_for_next" - it was a redundant sanity check, that really
just complicated things
rm "local_commitment", "remote_commitment", "set_local_commitment",
"set_remote_commitment" - just use "get_latest_commitment" instead
5 years ago