ThomasV
2944ae1b2f
Merge pull request #5583 from JeremyRand/test-lnrouter-rev-genesis-bytes
...
test_lnrouter: Pull in chain_hash from constants
2019-08-25 10:17:06 +02:00
JeremyRand
032810dace
test_lnrouter: Pull in chain_hash from constants
2019-08-25 07:19:36 +00:00
JeremyRand
334d3f2818
Use NamedTuple notation for TxOutput in test_lnchannel
...
This makes the code more resilient in case additional members are added
to TxOutput later.
2019-08-25 06:51:31 +00:00
ThomasV
ab5a02ba50
kivy: remove hidden state in RefLabel, use it for seed and private keys
2019-08-23 15:46:58 +02:00
ThomasV
e9c32bad19
kivy: remove context menus, cleanup unused files
2019-08-23 12:15:42 +02:00
ThomasV
587f8aa487
Kivy GUI improvements:
...
- create unique instances of channels_dialog and addresses_dialog
- display and refresh balances in channels_dialog
- improve formatting of tx history
- repurpose left button in receive_tab
2019-08-22 19:04:32 +02:00
ThomasV
8010123c08
Display and refresh the status of incoming payment requests:
...
- All requests have an expiration date
- Paid requests are automatically removed from the list
- Unpaid, unconfirmed and expired requests are displayed
- Fix a bug in get_payment_status, conf was off by one
2019-08-22 06:00:45 +02:00
ThomasV
336cf81a6d
kivy: add expiration button to receive screen
2019-08-20 18:20:54 +02:00
ThomasV
27a9d02b8c
kivy: update receive screen after adding request
2019-08-20 16:07:40 +02:00
ThomasV
65cf0ebce8
lnpeer, minor fixes:
...
- pass orphaned_ids to lnworker.add_new_ids
- fix enumeration of get_unacked_local_updates()
2019-08-20 13:27:09 +02:00
ThomasV
dd22cb6dff
kivy: minor fixes
2019-08-20 09:03:12 +02:00
ThomasV
246cda2928
fix Flake8 tests
2019-08-20 09:03:12 +02:00
ThomasV
a3bff7476c
run freeze_packages
2019-08-20 09:03:12 +02:00
ThomasV
9cfeadea70
Turn daemon subcommands into RPCs
2019-08-20 09:03:12 +02:00
ThomasV
4397767a5e
minor fix
2019-08-20 09:03:12 +02:00
ThomasV
2e1829bc24
remove jsonrpclib dependency
2019-08-20 09:03:12 +02:00
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
2019-08-20 09:03:12 +02:00
SomberNight
fa5302bcfb
(trivial) fix type annotation
2019-08-20 09:03:12 +02:00
SomberNight
bce74717a6
lnpeer: in onion errors, handle channel updates both with and w/o type
2019-08-20 09:03:12 +02:00
SomberNight
beeb81e179
lnpeer: use correct failure codes in _maybe_forward_htlc
2019-08-20 09:03:12 +02:00
SomberNight
e54f0fbafa
do not raise BaseException
2019-08-20 09:03:12 +02:00
SomberNight
d955285808
lnrouter/channeldb: small import clean-up
2019-08-20 09:03:12 +02:00
SomberNight
47ee02569a
lnpeer: send own outgoing channel updates to remote peer
2019-08-20 09:03:12 +02:00
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."
2019-08-20 09:03:12 +02:00
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)
2019-08-20 09:03:12 +02:00
SomberNight
ba431495db
lnworker: fix silent TypeError in _calc_routing_hints_for_invoice
2019-08-20 09:03:12 +02:00
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
2019-08-20 09:03:12 +02:00
SomberNight
a9295e495c
tests: regtest.sh now uses consistent indentation
2019-08-20 09:03:12 +02:00
SomberNight
6b1810f8dc
commands.py: fix type of "timeout" arg
...
was str by default
2019-08-20 09:03:12 +02:00
SomberNight
159fe04daf
lnpeer: on_channel_open should not fail on server error
2019-08-20 09:03:12 +02:00
ThomasV
e5286f7598
minor fix: always initialize Commands.lnworker
2019-08-20 09:03:12 +02:00
ThomasV
5e0427392f
Daemon: Replace get_server with request.
...
This function performs a single RPC, and may raise a DaemonNotRunning exception.
2019-08-20 09:03:12 +02:00
ThomasV
28b1569f28
(trivial) fix getbalance
2019-08-20 09:03:12 +02:00
ThomasV
b81feb6550
daemon: simplify get_fd_or_server
2019-08-20 09:03:12 +02:00
SomberNight
a9239bd40f
lnpeer: shutdown should wait until no HTLCs remain
...
in either ctx
2019-08-20 09:03:12 +02:00
SomberNight
2e38bcf416
lnpeer: failed htlc error handling ignored length of channel_update
2019-08-20 09:03:12 +02:00
SomberNight
d2d4d19fcb
lnpeer: add a few sanity checks to payment-forwarding (and related)
2019-08-20 09:03:12 +02:00
SomberNight
0973b86925
lnworker: rework "is_dangerous"
...
"Should channel be closed due to expiring htlcs?"
2019-08-20 09:03:12 +02:00
SomberNight
ce54b5411e
lnhtlc: htlcs_by_direction now returns dict keyed by htlc_id
2019-08-20 09:03:12 +02:00
ThomasV
8e2ebddc0b
add jsonrpcserver/jsonrpcclient to requirements
2019-08-20 09:03:12 +02:00
ThomasV
b2f61bdc06
use aiohttp + jsonrpcserver in watchtower
2019-08-20 09:03:12 +02:00
ThomasV
de29fe6930
remove unused import
2019-08-20 09:03:12 +02:00
SomberNight
8ad25b3a52
lnpeer: make sure forwarding is disabled by default
2019-08-20 09:03:12 +02:00
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
2019-08-20 09:03:12 +02:00
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.
2019-08-20 09:03:12 +02:00
ThomasV
98a1c9268a
qt: do not show paid requests
2019-08-20 09:03:12 +02:00
ThomasV
bd5c83e906
fix race condition with channel_timestamps
2019-08-20 09:03:12 +02:00
ThomasV
b493219829
require data loss protect
2019-08-20 09:03:12 +02:00
ThomasV
9f8e2c689e
test funding_txn_minimum_depth, show it in GUI
2019-08-20 09:03:12 +02:00
ThomasV
bbec1dceda
lnpeer: fix and simplify tests in maybe_send_commitment
2019-08-20 09:03:12 +02:00