niftynei
88b4b5b2bb
df-tests: test_disconnect_opener
2021-01-10 13:44:04 +01:00
niftynei
3e330d7186
df-tests: test_forward_local_failed_stats
2021-01-10 13:44:04 +01:00
niftynei
973224dd14
df-tests: if we're using fundbalancechannel, set up plugin
...
nodes need to be using the accepter plugin, so they'll match funding.
we used to use push_msat for this, but v2 gets rid of it.
*sad trombone*
2021-01-10 13:44:04 +01:00
niftynei
f822a93cf4
df-tests: add setacceptmaxfunding
to df_accepter plugin
...
Method for setting a ceiling on the fund matching capabilities of
df_accepter. Setting it to zero means we don't fund the channel anymore.
2021-01-10 13:44:04 +01:00
niftynei
e964c31369
df-tests: test_payment_success|failed_persistence
2021-01-10 13:44:04 +01:00
niftynei
09da171381
df-tests: test_io_logging
...
Move pid collection down to when dualopend is definitely dead
2021-01-10 13:44:04 +01:00
niftynei
609d509ca5
df-tests: test_channel_state_changed_unilateral
2021-01-10 13:44:04 +01:00
niftynei
ac88c72f1e
df-tests: test_channel_state_changed_bilateral
2021-01-10 13:44:04 +01:00
niftynei
450a094d26
df-tests: test_coin_movement_notices
2021-01-10 13:44:04 +01:00
niftynei
923e1f5c80
df-tests: test_feature_set
2021-01-10 13:44:04 +01:00
niftynei
db65771f38
df-tests: test_plugin_feature_announce
2021-01-10 13:44:04 +01:00
niftynei
21b9bec93b
df-tests: test_channel_state_change_history
2021-01-10 13:44:04 +01:00
niftynei
959ca793b0
df-tests: test_openchannel_hook_error_handling
2021-01-10 13:44:04 +01:00
niftynei
803d9701d3
df-tests: test_openchannel_hook_chaining
2021-01-10 13:44:04 +01:00
niftynei
b0a8b10b41
df-tests: test_openchannel_hook
...
Have it check both openchannel + openchannel2
2021-01-10 13:44:04 +01:00
niftynei
0d45823b82
df-tests: test_funding_reorg_private
2021-01-10 13:44:04 +01:00
niftynei
09834bbc8d
df-tests: test_node_reannounce correct features
2021-01-10 13:44:04 +01:00
niftynei
c055198869
df-tests: test_fail_unconfirmed, duplicate with correct wires
2021-01-10 13:44:04 +01:00
niftynei
dfa0eb0f2f
df-tests: test_shutdown_awaiting_lockin check correct state
2021-01-10 13:44:04 +01:00
niftynei
5c7cc15a75
df-tests: adjust logsearch/features for test_dataloss_protection
2021-01-10 13:44:04 +01:00
niftynei
e661d87440
df-tests: fixup expected features for dual-funding channels
2021-01-10 13:44:04 +01:00
niftynei
08200f03a7
df-tests: test_multifunding_v2_v1_mixed update to use flag
...
Now that we've got a fancy flag to enable dual funding, let's use it
2021-01-10 13:44:04 +01:00
niftynei
8fb97fd7e1
df-tests: updates for plugin hook_accepter helper
...
Fixes so that test_funding_close_upfront works with v2 opens
2021-01-10 13:44:04 +01:00
niftynei
f4b7904ce5
tests: don't enforce daemon name on opening logline
2021-01-10 13:44:04 +01:00
niftynei
9951638d5f
df: add flag to signal to run v2 channel open tests
2021-01-10 13:44:04 +01:00
niftynei
99a621dd99
df-reconnects: allow tx-sigs in channeld iff we're reconnecting
...
There's a case where a dropped funding_locked will result in the peer
moving onto channeld, while we stay in dualopend. As we haven't
received their funding_locked, we retransmit tx_sigs, which channeld
will need to handle.
With the patch the peer drops it on the floor; the peer will resend
funding_locked on reconnect, which will correctly advance us to
channeld and CHANNELD_NORMAL
2021-01-10 13:44:04 +01:00
Rusty Russell
af46a4f57d
fetchinvoice: allow amounts to be specified.
...
As per lastest revision of the spec, we can specify amounts in invoice
requests even if the offer already specifies it, as long as we exceed
the amount given. This allows for tipping, and amount obfuscation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 12:45:31 +01:00
Rusty Russell
4bb05e46e9
offers: convert currency when they request an invoice.
...
Means a reshuffle of our logic: we want to multiply by quantity before
conversion for maximum accuracy.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 12:45:31 +01:00
Rusty Russell
9681d491df
offer: allow offers in other currencies if we can convert.
...
This avoids a footgun where they create an offer then we can't create
the invoice because they don't have a converter plugin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 12:45:31 +01:00
Rusty Russell
23af9d4972
onion_message: support variable-length onion messages.
...
Updated to the BOLT, and a few tweaks, and we can send giant onion_messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 12:45:31 +01:00
Rusty Russell
d867fab3a7
sendinvoice: call waitinvoice directly to on invoice payment.
...
Suggested-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
1aa7e8e011
offers: split offer send_invoice generation into new JSON command
...
We split `send_invoice` offers inoo offerout (for want of a better name).
This simplifies the API.
Also took the opportunity to move the `vendor` tag to immediately
follow `description` (our tests use arguments by keywords, so no
change there).
Suggested-by: shesek
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
55983827b6
fetchinvoice: try direct peers if we can't route.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
bdfcec3eb6
fetchinvoice: check we're in the period before attempting to fetch.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
dae477175c
fetchinvoice: implement timeout.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
075c25fc08
plugins/fetchinvoice: handle sendinvoice timeout, error or payment.
...
If they pay the invoice, they don't bother replying; that's just for
errors.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Rusty Russell
43f5304539
plugins/offer: allow offer
to create send_invoice
, refund
and single_use
offers.
...
refund offers are implied send_invoice offers. And send_invoice offers
are implied single-use offers, though it can also make sense to have
a non-send_invoice offer be single-use.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-09 14:34:35 +10:30
Christian Decker
6b6e0fe34c
pytest: Mark test_lockup_drain
as disabled
...
It's been causing me headaches for some time, and it's just getting
annoying. Will file an issue to track progress.
2021-01-08 19:28:30 +01:00
niftynei
d0dcb7cb42
tests: wait for drop to chain test_onchain_middleman_their_unilateral_in
...
this was catching the wrong 'sendrawtx exit 0' and consequently
not mining the close tx into a block
2021-01-08 19:28:30 +01:00
Rusty Russell
1a8978100e
invoice: add ctlv option.
...
This is required if we want to create a "bouncer" plugin (in my copious free time!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `invoice` now takes an optional `cltv` parameter.
2021-01-08 10:45:56 +01:00
Christian Decker
4b2efd69d7
pay: Fix a crash when waitblockheight times out
...
Fixes #4309
Changelog-Fixed: pay: Fixed an issue where waiting for the blockchain height to sync could time out.
2021-01-08 09:19:24 +01:00
Christian Decker
ca204eacfa
pytest: Reproduce waitblockheight timeout issue #4309
2021-01-08 09:19:24 +01:00
Christian Decker
70410b8ee8
pytest: Test LightningRpc and plugin command notification support
2021-01-07 08:32:40 +01:00
Christian Decker
84b3653606
pyln: Add command notification support for plugins
...
Changelog-Added: pyln-client: Plugin methods can now report progress or status via the `Request.notify` function
2021-01-07 08:32:40 +01:00
Christian Decker
a1d33c3781
pytest: Add a test for listinvoices
...
We now have some more logic in the query, so let's test it
exhaustively.
2021-01-06 18:48:06 +01:00
Antoine Poinsot
a4f07a3e78
tests/fuzz: add a fuzz target for hsm_encryption
...
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
Antoine Poinsot
506d524508
libfuzz: add a NULL-termination in to_string
...
It's more useful if we actually want to use the output as, well, a
string..
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
Antoine Poinsot
56c223886c
lightning: confirm password on hsm_secret encryption
...
Changelog-changed: lightningd: the `--encrypted-hsm` now asks you to confirm your password when first set
Changelog-changed: hsmtool: the `encrypt` now asks you to confirm your password
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
niftynei
0c9072272f
df-plugin: add signonly
to signing in df_accepter
...
We're the accepter, so we look up which inputs we need to sign and only
sign those.
2021-01-05 19:12:00 +01:00
niftynei
e3a1d1a7f3
pyln-client: to_whole_satoshi returns the rounded up satoshi value
...
A fractional satoshi value isn't really useful; rounding up loses
precision but that's why you called "whole satoshi", wasn't it?
Changelog-Changed: pyln-client: Millisatoshi has new method, `to_whole_satoshi`; *rounds value up* to the nearest whole satoshi
2021-01-05 19:12:00 +01:00