2021-12-04 12:23:56 +01:00
|
|
|
#include "config.h"
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
#include "../invoice.c"
|
|
|
|
#include "../peer_control.c"
|
2020-09-08 06:57:53 +02:00
|
|
|
#include "../routehint.c"
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
#include <ccan/alignof/alignof.h>
|
2020-01-26 13:52:29 +01:00
|
|
|
#include <common/errcode.h>
|
2020-12-02 01:10:04 +01:00
|
|
|
#include <common/setup.h>
|
2021-09-17 00:31:38 +02:00
|
|
|
#include <stdio.h>
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
|
|
|
/* AUTOGENERATED MOCKS START */
|
2022-03-22 23:59:20 +01:00
|
|
|
/* Generated stub for any_channel_by_scid */
|
|
|
|
struct channel *any_channel_by_scid(struct lightningd *ld UNNEEDED,
|
|
|
|
const struct short_channel_id *scid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "any_channel_by_scid called!\n"); abort(); }
|
2020-01-09 16:38:12 +01:00
|
|
|
/* Generated stub for bitcoind_getutxout_ */
|
|
|
|
void bitcoind_getutxout_(struct bitcoind *bitcoind UNNEEDED,
|
2021-10-13 05:45:36 +02:00
|
|
|
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
2020-01-09 16:38:12 +01:00
|
|
|
void (*cb)(struct bitcoind *bitcoind UNNEEDED,
|
|
|
|
const struct bitcoin_tx_output *txout UNNEEDED,
|
|
|
|
void *arg) UNNEEDED,
|
|
|
|
void *arg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for bolt11_decode */
|
|
|
|
struct bolt11 *bolt11_decode(const tal_t *ctx UNNEEDED, const char *str UNNEEDED,
|
2020-04-11 05:22:40 +02:00
|
|
|
const struct feature_set *our_features UNNEEDED,
|
2020-09-23 03:07:19 +02:00
|
|
|
const char *description UNNEEDED,
|
|
|
|
const struct chainparams *must_be_chain UNNEEDED,
|
|
|
|
char **fail UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "bolt11_decode called!\n"); abort(); }
|
2020-12-14 02:21:48 +01:00
|
|
|
/* Generated stub for bolt11_decode_nosig */
|
|
|
|
struct bolt11 *bolt11_decode_nosig(const tal_t *ctx UNNEEDED, const char *str UNNEEDED,
|
|
|
|
const struct feature_set *our_features UNNEEDED,
|
|
|
|
const char *description UNNEEDED,
|
|
|
|
const struct chainparams *must_be_chain UNNEEDED,
|
|
|
|
struct sha256 *hash UNNEEDED,
|
|
|
|
u5 **sig UNNEEDED,
|
|
|
|
bool *have_n UNNEEDED,
|
|
|
|
char **fail UNNEEDED)
|
|
|
|
{ fprintf(stderr, "bolt11_decode_nosig called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for bolt11_encode_ */
|
|
|
|
char *bolt11_encode_(const tal_t *ctx UNNEEDED,
|
|
|
|
const struct bolt11 *b11 UNNEEDED, bool n_field UNNEEDED,
|
|
|
|
bool (*sign)(const u5 *u5bytes UNNEEDED,
|
|
|
|
const u8 *hrpu8 UNNEEDED,
|
|
|
|
secp256k1_ecdsa_recoverable_signature *rsig UNNEEDED,
|
|
|
|
void *arg) UNNEEDED,
|
|
|
|
void *arg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "bolt11_encode_ called!\n"); abort(); }
|
|
|
|
/* Generated stub for broadcast_tx */
|
|
|
|
void broadcast_tx(struct chain_topology *topo UNNEEDED,
|
|
|
|
struct channel *channel UNNEEDED, const struct bitcoin_tx *tx UNNEEDED,
|
|
|
|
void (*failed)(struct channel *channel UNNEEDED,
|
2020-01-09 12:25:45 +01:00
|
|
|
bool success UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
const char *err))
|
|
|
|
{ fprintf(stderr, "broadcast_tx called!\n"); abort(); }
|
2020-10-28 11:46:23 +01:00
|
|
|
/* Generated stub for channel_change_state_reason_str */
|
|
|
|
const char *channel_change_state_reason_str(enum state_change reason UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_change_state_reason_str called!\n"); abort(); }
|
2021-02-16 20:23:53 +01:00
|
|
|
/* Generated stub for channel_cleanup_commands */
|
|
|
|
void channel_cleanup_commands(struct channel *channel UNNEEDED, const char *why UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_cleanup_commands called!\n"); abort(); }
|
2020-09-08 06:57:53 +02:00
|
|
|
/* Generated stub for channel_fail_forget */
|
|
|
|
void channel_fail_forget(struct channel *channel UNNEEDED, const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "channel_fail_forget called!\n"); abort(); }
|
|
|
|
/* Generated stub for channel_fail_permanent */
|
feat: adds state change cause and message
This adds a `state_change` 'cause' to a channel.
A 'cause' is some initial 'reason' a channel was created or closed by:
/* Anything other than the reasons below. Should not happen. */
REASON_UNKNOWN,
/* Unconscious internal reasons, e.g. dev fail of a channel. */
REASON_LOCAL,
/* The operator or a plugin opened or closed a channel by intention. */
REASON_USER,
/* The remote closed or funded a channel with us by intention. */
REASON_REMOTE,
/* E.g. We need to close a channel because of bad signatures and such. */
REASON_PROTOCOL,
/* A channel was closed onchain, while we were offline. */
/* Note: This is very likely a conscious remote decision. */
REASON_ONCHAIN
If a 'cause' is known and a subsequent state change is made with
`REASON_UNKNOWN` the preceding cause will be used as reason, since a lot
(all `REASON_UNKNOWN`) state changes are a subsequent consequences of a prior
cause: local, user, remote, protocol or onchain.
Changelog-Added: Plugins: Channel closure resaon/cause to channel_state_changed notification
2020-10-28 11:46:12 +01:00
|
|
|
void channel_fail_permanent(struct channel *channel UNNEEDED,
|
|
|
|
enum state_change reason UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED,
|
|
|
|
...)
|
2020-09-08 06:57:53 +02:00
|
|
|
{ fprintf(stderr, "channel_fail_permanent called!\n"); abort(); }
|
|
|
|
/* Generated stub for channel_fail_reconnect */
|
|
|
|
void channel_fail_reconnect(struct channel *channel UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "channel_fail_reconnect called!\n"); abort(); }
|
|
|
|
/* Generated stub for channel_fail_reconnect_later */
|
|
|
|
void channel_fail_reconnect_later(struct channel *channel UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED,...)
|
|
|
|
{ fprintf(stderr, "channel_fail_reconnect_later called!\n"); abort(); }
|
|
|
|
/* Generated stub for channel_has_htlc_in */
|
|
|
|
struct htlc_in *channel_has_htlc_in(struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_has_htlc_in called!\n"); abort(); }
|
|
|
|
/* Generated stub for channel_has_htlc_out */
|
|
|
|
struct htlc_out *channel_has_htlc_out(struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_has_htlc_out called!\n"); abort(); }
|
2021-05-20 23:50:42 +02:00
|
|
|
/* Generated stub for channel_inflight_find */
|
|
|
|
struct channel_inflight *channel_inflight_find(struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_txid *txid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_inflight_find called!\n"); abort(); }
|
2020-09-08 06:57:53 +02:00
|
|
|
/* Generated stub for channel_internal_error */
|
|
|
|
void channel_internal_error(struct channel *channel UNNEEDED, const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "channel_internal_error called!\n"); abort(); }
|
2021-02-24 03:58:28 +01:00
|
|
|
/* Generated stub for channel_last_funding_feerate */
|
|
|
|
u32 channel_last_funding_feerate(const struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_last_funding_feerate called!\n"); abort(); }
|
2021-05-20 23:50:42 +02:00
|
|
|
/* Generated stub for channel_set_last_tx */
|
|
|
|
void channel_set_last_tx(struct channel *channel UNNEEDED,
|
|
|
|
struct bitcoin_tx *tx UNNEEDED,
|
|
|
|
const struct bitcoin_signature *sig UNNEEDED,
|
|
|
|
enum wallet_tx_type type UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_set_last_tx called!\n"); abort(); }
|
2020-09-08 06:57:53 +02:00
|
|
|
/* Generated stub for channel_state_name */
|
|
|
|
const char *channel_state_name(const struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_state_name called!\n"); abort(); }
|
2020-10-28 11:46:23 +01:00
|
|
|
/* Generated stub for channel_state_str */
|
|
|
|
const char *channel_state_str(enum channel_state state UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_state_str called!\n"); abort(); }
|
2019-02-26 17:57:19 +01:00
|
|
|
/* Generated stub for channel_tell_depth */
|
|
|
|
bool channel_tell_depth(struct lightningd *ld UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_txid *txid UNNEEDED,
|
|
|
|
u32 depth UNNEEDED)
|
2019-02-26 17:57:19 +01:00
|
|
|
{ fprintf(stderr, "channel_tell_depth called!\n"); abort(); }
|
2021-09-09 07:29:35 +02:00
|
|
|
/* Generated stub for channel_type_has */
|
|
|
|
bool channel_type_has(const struct channel_type *type UNNEEDED, int feature UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_type_has called!\n"); abort(); }
|
2021-05-11 18:58:00 +02:00
|
|
|
/* Generated stub for channel_unsaved_close_conn */
|
|
|
|
void channel_unsaved_close_conn(struct channel *channel UNNEEDED, const char *why UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_unsaved_close_conn called!\n"); abort(); }
|
2021-05-20 23:50:42 +02:00
|
|
|
/* Generated stub for channel_update_reserve */
|
|
|
|
void channel_update_reserve(struct channel *channel UNNEEDED,
|
|
|
|
struct channel_config *their_config UNNEEDED,
|
|
|
|
struct amount_sat funding_total UNNEEDED)
|
|
|
|
{ fprintf(stderr, "channel_update_reserve called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for command_fail */
|
2020-01-26 13:52:29 +01:00
|
|
|
struct command_result *command_fail(struct command *cmd UNNEEDED, errcode_t code UNNEEDED,
|
2018-12-16 05:49:06 +01:00
|
|
|
const char *fmt UNNEEDED, ...)
|
|
|
|
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "command_fail called!\n"); abort(); }
|
2018-10-19 03:17:48 +02:00
|
|
|
/* Generated stub for command_failed */
|
2018-12-16 05:49:06 +01:00
|
|
|
struct command_result *command_failed(struct command *cmd UNNEEDED,
|
2018-12-17 04:52:08 +01:00
|
|
|
struct json_stream *result)
|
|
|
|
|
2018-10-19 03:17:48 +02:00
|
|
|
{ fprintf(stderr, "command_failed called!\n"); abort(); }
|
2018-12-16 05:52:06 +01:00
|
|
|
/* Generated stub for command_its_complicated */
|
2018-12-17 04:52:08 +01:00
|
|
|
struct command_result *command_its_complicated(const char *why UNNEEDED)
|
2018-12-16 05:52:06 +01:00
|
|
|
{ fprintf(stderr, "command_its_complicated called!\n"); abort(); }
|
|
|
|
/* Generated stub for command_param_failed */
|
|
|
|
struct command_result *command_param_failed(void)
|
2018-12-17 04:52:08 +01:00
|
|
|
|
2018-12-16 05:52:06 +01:00
|
|
|
{ fprintf(stderr, "command_param_failed called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for command_still_pending */
|
2018-12-17 04:52:08 +01:00
|
|
|
struct command_result *command_still_pending(struct command *cmd)
|
|
|
|
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "command_still_pending called!\n"); abort(); }
|
|
|
|
/* Generated stub for command_success */
|
2018-12-16 05:49:06 +01:00
|
|
|
struct command_result *command_success(struct command *cmd UNNEEDED,
|
2018-12-17 04:52:08 +01:00
|
|
|
struct json_stream *response)
|
|
|
|
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "command_success called!\n"); abort(); }
|
|
|
|
/* Generated stub for connect_succeeded */
|
2021-03-16 04:44:36 +01:00
|
|
|
void connect_succeeded(struct lightningd *ld UNNEEDED, const struct peer *peer UNNEEDED,
|
2021-03-25 04:53:31 +01:00
|
|
|
bool incoming UNNEEDED,
|
2021-03-16 04:44:36 +01:00
|
|
|
const struct wireaddr_internal *addr UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "connect_succeeded called!\n"); abort(); }
|
2021-06-14 23:07:38 +02:00
|
|
|
/* Generated stub for db_begin_transaction_ */
|
|
|
|
void db_begin_transaction_(struct db *db UNNEEDED, const char *location UNNEEDED)
|
|
|
|
{ fprintf(stderr, "db_begin_transaction_ called!\n"); abort(); }
|
|
|
|
/* Generated stub for db_commit_transaction */
|
|
|
|
void db_commit_transaction(struct db *db UNNEEDED)
|
|
|
|
{ fprintf(stderr, "db_commit_transaction called!\n"); abort(); }
|
2020-09-08 06:57:53 +02:00
|
|
|
/* Generated stub for delete_channel */
|
|
|
|
void delete_channel(struct channel *channel STEALS UNNEEDED)
|
|
|
|
{ fprintf(stderr, "delete_channel called!\n"); abort(); }
|
2022-07-08 11:52:11 +02:00
|
|
|
/* Generated stub for deprecated_apis */
|
|
|
|
bool deprecated_apis;
|
2019-10-29 18:00:18 +01:00
|
|
|
/* Generated stub for encode_scriptpubkey_to_addr */
|
|
|
|
char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
|
|
|
|
const struct chainparams *chainparams UNNEEDED,
|
2020-01-09 16:38:12 +01:00
|
|
|
const u8 *scriptPubkey UNNEEDED)
|
2019-10-29 18:00:18 +01:00
|
|
|
{ fprintf(stderr, "encode_scriptpubkey_to_addr called!\n"); abort(); }
|
2020-07-20 07:49:52 +02:00
|
|
|
/* Generated stub for failmsg_incorrect_or_unknown_ */
|
|
|
|
const u8 *failmsg_incorrect_or_unknown_(const tal_t *ctx UNNEEDED,
|
|
|
|
struct lightningd *ld UNNEEDED,
|
|
|
|
const struct htlc_in *hin UNNEEDED,
|
|
|
|
const char *file UNNEEDED, int line UNNEEDED)
|
|
|
|
{ fprintf(stderr, "failmsg_incorrect_or_unknown_ called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for fatal */
|
|
|
|
void fatal(const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "fatal called!\n"); abort(); }
|
2019-11-23 01:19:23 +01:00
|
|
|
/* Generated stub for feature_is_set */
|
|
|
|
bool feature_is_set(const u8 *features UNNEEDED, size_t bit UNNEEDED)
|
|
|
|
{ fprintf(stderr, "feature_is_set called!\n"); abort(); }
|
2020-09-09 12:10:28 +02:00
|
|
|
/* Generated stub for feature_negotiated */
|
|
|
|
bool feature_negotiated(const struct feature_set *our_features UNNEEDED,
|
|
|
|
const u8 *their_features UNNEEDED, size_t f UNNEEDED)
|
|
|
|
{ fprintf(stderr, "feature_negotiated called!\n"); abort(); }
|
2022-02-18 16:34:05 +01:00
|
|
|
/* Generated stub for featurebits_or */
|
|
|
|
u8 *featurebits_or(const tal_t *ctx UNNEEDED, const u8 *f1 TAKES UNNEEDED, const u8 *f2 TAKES UNNEEDED)
|
|
|
|
{ fprintf(stderr, "featurebits_or called!\n"); abort(); }
|
2022-04-28 17:55:15 +02:00
|
|
|
/* Generated stub for find_channel_by_alias */
|
|
|
|
struct channel *find_channel_by_alias(const struct peer *peer UNNEEDED,
|
|
|
|
const struct short_channel_id *alias UNNEEDED,
|
|
|
|
enum side side UNNEEDED)
|
|
|
|
{ fprintf(stderr, "find_channel_by_alias called!\n"); abort(); }
|
2022-03-22 21:27:30 +01:00
|
|
|
/* Generated stub for find_channel_by_id */
|
|
|
|
struct channel *find_channel_by_id(const struct peer *peer UNNEEDED,
|
|
|
|
const struct channel_id *cid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "find_channel_by_id called!\n"); abort(); }
|
2022-03-22 23:59:20 +01:00
|
|
|
/* Generated stub for find_channel_by_scid */
|
|
|
|
struct channel *find_channel_by_scid(const struct peer *peer UNNEEDED,
|
|
|
|
const struct short_channel_id *scid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "find_channel_by_scid called!\n"); abort(); }
|
2021-06-14 23:07:38 +02:00
|
|
|
/* Generated stub for find_plugin_for_command */
|
|
|
|
struct plugin *find_plugin_for_command(struct lightningd *ld UNNEEDED,
|
|
|
|
const char *cmd_name UNNEEDED)
|
|
|
|
{ fprintf(stderr, "find_plugin_for_command called!\n"); abort(); }
|
2019-12-12 00:39:10 +01:00
|
|
|
/* Generated stub for fixup_htlcs_out */
|
|
|
|
void fixup_htlcs_out(struct lightningd *ld UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fixup_htlcs_out called!\n"); abort(); }
|
2020-05-16 03:29:05 +02:00
|
|
|
/* Generated stub for fromwire_bigsize */
|
|
|
|
bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
|
2020-05-15 12:29:53 +02:00
|
|
|
/* Generated stub for fromwire_channel_id */
|
2021-12-28 00:24:09 +01:00
|
|
|
bool fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
|
2020-05-15 12:29:53 +02:00
|
|
|
struct channel_id *channel_id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_channel_id called!\n"); abort(); }
|
2020-08-25 03:33:16 +02:00
|
|
|
/* Generated stub for fromwire_channeld_dev_memleak_reply */
|
|
|
|
bool fromwire_channeld_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_channeld_dev_memleak_reply called!\n"); abort(); }
|
2022-03-22 21:27:29 +01:00
|
|
|
/* Generated stub for fromwire_connectd_peer_active */
|
2022-03-22 21:27:30 +01:00
|
|
|
bool fromwire_connectd_peer_active(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct node_id *id UNNEEDED, u16 **msgtype UNNEEDED, struct channel_id *channel_id UNNEEDED)
|
2022-03-22 21:27:29 +01:00
|
|
|
{ fprintf(stderr, "fromwire_connectd_peer_active called!\n"); abort(); }
|
2020-08-25 04:16:22 +02:00
|
|
|
/* Generated stub for fromwire_connectd_peer_connected */
|
2021-10-12 13:16:37 +02:00
|
|
|
bool fromwire_connectd_peer_connected(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct node_id *id UNNEEDED, struct wireaddr_internal *addr UNNEEDED, struct wireaddr **remote_addr UNNEEDED, bool *incoming UNNEEDED, u8 **features UNNEEDED)
|
2020-08-25 04:16:22 +02:00
|
|
|
{ fprintf(stderr, "fromwire_connectd_peer_connected called!\n"); abort(); }
|
2022-03-22 21:26:30 +01:00
|
|
|
/* Generated stub for fromwire_connectd_peer_disconnect_done */
|
|
|
|
bool fromwire_connectd_peer_disconnect_done(const void *p UNNEEDED, struct node_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_connectd_peer_disconnect_done called!\n"); abort(); }
|
2022-03-08 01:31:26 +01:00
|
|
|
/* Generated stub for fromwire_dualopend_dev_memleak_reply */
|
|
|
|
bool fromwire_dualopend_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_dualopend_dev_memleak_reply called!\n"); abort(); }
|
2020-12-14 02:21:48 +01:00
|
|
|
/* Generated stub for fromwire_hsmd_sign_bolt12_reply */
|
|
|
|
bool fromwire_hsmd_sign_bolt12_reply(const void *p UNNEEDED, struct bip340sig *sig UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_hsmd_sign_bolt12_reply called!\n"); abort(); }
|
2020-08-25 03:55:38 +02:00
|
|
|
/* Generated stub for fromwire_hsmd_sign_commitment_tx_reply */
|
|
|
|
bool fromwire_hsmd_sign_commitment_tx_reply(const void *p UNNEEDED, struct bitcoin_signature *sig UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_hsmd_sign_commitment_tx_reply called!\n"); abort(); }
|
|
|
|
/* Generated stub for fromwire_hsmd_sign_invoice_reply */
|
|
|
|
bool fromwire_hsmd_sign_invoice_reply(const void *p UNNEEDED, secp256k1_ecdsa_recoverable_signature *sig UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_hsmd_sign_invoice_reply called!\n"); abort(); }
|
2020-05-16 03:29:05 +02:00
|
|
|
/* Generated stub for fromwire_node_id */
|
|
|
|
void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct node_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_node_id called!\n"); abort(); }
|
2020-08-25 04:15:48 +02:00
|
|
|
/* Generated stub for fromwire_onchaind_dev_memleak_reply */
|
|
|
|
bool fromwire_onchaind_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_onchaind_dev_memleak_reply called!\n"); abort(); }
|
2022-03-08 01:14:41 +01:00
|
|
|
/* Generated stub for fromwire_openingd_dev_memleak_reply */
|
|
|
|
bool fromwire_openingd_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
|
|
|
|
{ fprintf(stderr, "fromwire_openingd_dev_memleak_reply called!\n"); abort(); }
|
2018-11-15 14:08:10 +01:00
|
|
|
/* Generated stub for get_block_height */
|
|
|
|
u32 get_block_height(const struct chain_topology *topo UNNEEDED)
|
|
|
|
{ fprintf(stderr, "get_block_height called!\n"); abort(); }
|
2019-12-12 18:18:25 +01:00
|
|
|
/* Generated stub for get_feerate */
|
|
|
|
u32 get_feerate(const struct fee_states *fee_states UNNEEDED,
|
2019-09-09 18:11:24 +02:00
|
|
|
enum side opener UNNEEDED,
|
2019-12-12 18:18:25 +01:00
|
|
|
enum side side UNNEEDED)
|
|
|
|
{ fprintf(stderr, "get_feerate called!\n"); abort(); }
|
2020-09-08 05:49:35 +02:00
|
|
|
/* Generated stub for hash_htlc_key */
|
|
|
|
size_t hash_htlc_key(const struct htlc_key *htlc_key UNNEEDED)
|
|
|
|
{ fprintf(stderr, "hash_htlc_key called!\n"); abort(); }
|
2019-05-31 09:30:32 +02:00
|
|
|
/* Generated stub for htlc_is_trimmed */
|
|
|
|
bool htlc_is_trimmed(enum side htlc_owner UNNEEDED,
|
|
|
|
struct amount_msat htlc_amount UNNEEDED,
|
|
|
|
u32 feerate_per_kw UNNEEDED,
|
|
|
|
struct amount_sat dust_limit UNNEEDED,
|
2020-08-13 19:44:02 +02:00
|
|
|
enum side side UNNEEDED,
|
|
|
|
bool option_anchor_outputs UNNEEDED)
|
2019-05-31 09:30:32 +02:00
|
|
|
{ fprintf(stderr, "htlc_is_trimmed called!\n"); abort(); }
|
2022-03-21 01:58:57 +01:00
|
|
|
/* Generated stub for htlc_max_possible_send */
|
|
|
|
struct amount_msat htlc_max_possible_send(const struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "htlc_max_possible_send called!\n"); abort(); }
|
2019-12-12 00:55:45 +01:00
|
|
|
/* Generated stub for htlc_set_fail */
|
2020-02-21 06:08:39 +01:00
|
|
|
void htlc_set_fail(struct htlc_set *set UNNEEDED, const u8 *failmsg TAKES UNNEEDED)
|
2019-12-12 00:55:45 +01:00
|
|
|
{ fprintf(stderr, "htlc_set_fail called!\n"); abort(); }
|
|
|
|
/* Generated stub for htlc_set_fulfill */
|
|
|
|
void htlc_set_fulfill(struct htlc_set *set UNNEEDED, const struct preimage *preimage UNNEEDED)
|
|
|
|
{ fprintf(stderr, "htlc_set_fulfill called!\n"); abort(); }
|
2021-01-13 09:58:38 +01:00
|
|
|
/* Generated stub for invoice_decode */
|
|
|
|
struct tlv_invoice *invoice_decode(const tal_t *ctx UNNEEDED,
|
|
|
|
const char *b12 UNNEEDED, size_t b12len UNNEEDED,
|
|
|
|
const struct feature_set *our_features UNNEEDED,
|
|
|
|
const struct chainparams *must_be_chain UNNEEDED,
|
|
|
|
char **fail UNNEEDED)
|
|
|
|
{ fprintf(stderr, "invoice_decode called!\n"); abort(); }
|
|
|
|
/* Generated stub for invoice_decode_nosig */
|
|
|
|
struct tlv_invoice *invoice_decode_nosig(const tal_t *ctx UNNEEDED,
|
|
|
|
const char *b12 UNNEEDED, size_t b12len UNNEEDED,
|
|
|
|
const struct feature_set *our_features UNNEEDED,
|
|
|
|
const struct chainparams *must_be_chain UNNEEDED,
|
|
|
|
char **fail UNNEEDED)
|
|
|
|
{ fprintf(stderr, "invoice_decode_nosig called!\n"); abort(); }
|
|
|
|
/* Generated stub for invoice_encode */
|
|
|
|
char *invoice_encode(const tal_t *ctx UNNEEDED, const struct tlv_invoice *bolt12_tlv UNNEEDED)
|
|
|
|
{ fprintf(stderr, "invoice_encode called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_address */
|
|
|
|
void json_add_address(struct json_stream *response UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
const struct wireaddr *addr UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_address called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_address_internal */
|
|
|
|
void json_add_address_internal(struct json_stream *response UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct wireaddr_internal *addr UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_address_internal called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_amount_msat_compat */
|
|
|
|
void json_add_amount_msat_compat(struct json_stream *result UNNEEDED,
|
|
|
|
struct amount_msat msat UNNEEDED,
|
|
|
|
const char *rawfieldname UNNEEDED,
|
|
|
|
const char *msatfieldname)
|
|
|
|
|
|
|
|
{ fprintf(stderr, "json_add_amount_msat_compat called!\n"); abort(); }
|
2020-12-02 15:17:06 +01:00
|
|
|
/* Generated stub for json_add_amount_msat_only */
|
|
|
|
void json_add_amount_msat_only(struct json_stream *result UNNEEDED,
|
|
|
|
const char *msatfieldname UNNEEDED,
|
|
|
|
struct amount_msat msat)
|
|
|
|
|
|
|
|
{ fprintf(stderr, "json_add_amount_msat_only called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_amount_sat_compat */
|
|
|
|
void json_add_amount_sat_compat(struct json_stream *result UNNEEDED,
|
|
|
|
struct amount_sat sat UNNEEDED,
|
|
|
|
const char *rawfieldname UNNEEDED,
|
|
|
|
const char *msatfieldname)
|
|
|
|
|
|
|
|
{ fprintf(stderr, "json_add_amount_sat_compat called!\n"); abort(); }
|
2022-06-19 09:16:11 +02:00
|
|
|
/* Generated stub for json_add_amount_sat_msat */
|
|
|
|
void json_add_amount_sat_msat(struct json_stream *result UNNEEDED,
|
|
|
|
const char *msatfieldname UNNEEDED,
|
|
|
|
struct amount_sat sat)
|
2021-03-03 04:16:57 +01:00
|
|
|
|
2022-06-19 09:16:11 +02:00
|
|
|
{ fprintf(stderr, "json_add_amount_sat_msat called!\n"); abort(); }
|
2021-01-07 19:47:47 +01:00
|
|
|
/* Generated stub for json_add_bolt11 */
|
|
|
|
void json_add_bolt11(struct json_stream *response UNNEEDED,
|
|
|
|
const struct bolt11 *b11 UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_bolt11 called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_add_bool */
|
|
|
|
void json_add_bool(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
bool value UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_bool called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_escaped_string */
|
|
|
|
void json_add_escaped_string(struct json_stream *result UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct json_escape *esc TAKES UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_escaped_string called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_hex_talarr */
|
|
|
|
void json_add_hex_talarr(struct json_stream *result UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const tal_t *data UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_invstring */
|
|
|
|
void json_add_invstring(struct json_stream *result UNNEEDED, const char *invstring UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_invstring called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for json_add_log */
|
2018-10-19 03:17:49 +02:00
|
|
|
void json_add_log(struct json_stream *result UNNEEDED,
|
2019-11-18 01:27:15 +01:00
|
|
|
const struct log_book *lr UNNEEDED,
|
|
|
|
const struct node_id *node_id UNNEEDED,
|
|
|
|
enum log_level minlevel UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_add_log called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_node_id */
|
|
|
|
void json_add_node_id(struct json_stream *response UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct node_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_node_id called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_add_num */
|
|
|
|
void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
unsigned int value UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_num called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_preimage */
|
|
|
|
void json_add_preimage(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
const struct preimage *preimage UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_preimage called!\n"); abort(); }
|
2021-07-12 01:04:33 +02:00
|
|
|
/* Generated stub for json_add_secret */
|
|
|
|
void json_add_secret(struct json_stream *response UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct secret *secret UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_secret called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_sha256 */
|
|
|
|
void json_add_sha256(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
const struct sha256 *hash UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_sha256 called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_short_channel_id */
|
|
|
|
void json_add_short_channel_id(struct json_stream *response UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct short_channel_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_short_channel_id called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_add_string */
|
|
|
|
void json_add_string(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED, const char *value TAKES UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_string called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_stringn */
|
|
|
|
void json_add_stringn(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
const char *value TAKES UNNEEDED, size_t value_len UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_stringn called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_timeiso */
|
|
|
|
void json_add_timeiso(struct json_stream *result UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
struct timeabs *time UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_timeiso called!\n"); abort(); }
|
2020-05-15 12:30:25 +02:00
|
|
|
/* Generated stub for json_add_tx */
|
|
|
|
void json_add_tx(struct json_stream *result UNNEEDED,
|
|
|
|
const char *fieldname UNNEEDED,
|
|
|
|
const struct bitcoin_tx *tx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_tx called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_txid */
|
|
|
|
void json_add_txid(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
const struct bitcoin_txid *txid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_txid called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_add_u32 */
|
|
|
|
void json_add_u32(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
uint32_t value UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_u32 called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_add_u64 */
|
|
|
|
void json_add_u64(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
|
|
|
|
uint64_t value UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_u64 called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for json_add_uncommitted_channel */
|
2018-10-19 03:17:49 +02:00
|
|
|
void json_add_uncommitted_channel(struct json_stream *response UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
const struct uncommitted_channel *uc UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_uncommitted_channel called!\n"); abort(); }
|
2021-02-24 03:29:38 +01:00
|
|
|
/* Generated stub for json_add_unsaved_channel */
|
|
|
|
void json_add_unsaved_channel(struct json_stream *response UNNEEDED,
|
|
|
|
const struct channel *channel UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_add_unsaved_channel called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for json_array_end */
|
2018-11-20 02:46:32 +01:00
|
|
|
void json_array_end(struct json_stream *js UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_array_end called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_array_start */
|
2018-11-20 02:46:32 +01:00
|
|
|
void json_array_start(struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_array_start called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_object_end */
|
2018-11-20 02:46:32 +01:00
|
|
|
void json_object_end(struct json_stream *js UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_object_end called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_object_start */
|
2018-11-20 02:46:32 +01:00
|
|
|
void json_object_start(struct json_stream *ks UNNEEDED, const char *fieldname UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_object_start called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_scan */
|
|
|
|
const char *json_scan(const tal_t *ctx UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
const char *guide UNNEEDED,
|
|
|
|
...)
|
|
|
|
{ fprintf(stderr, "json_scan called!\n"); abort(); }
|
2018-10-19 03:17:48 +02:00
|
|
|
/* Generated stub for json_stream_fail */
|
2018-10-19 03:17:49 +02:00
|
|
|
struct json_stream *json_stream_fail(struct command *cmd UNNEEDED,
|
2020-01-31 09:19:32 +01:00
|
|
|
errcode_t code UNNEEDED,
|
2018-10-19 03:17:48 +02:00
|
|
|
const char *errmsg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_stream_fail called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_stream_success */
|
2018-10-19 03:17:49 +02:00
|
|
|
struct json_stream *json_stream_success(struct command *cmd UNNEEDED)
|
2018-10-19 03:17:48 +02:00
|
|
|
{ fprintf(stderr, "json_stream_success called!\n"); abort(); }
|
2019-10-06 14:12:41 +02:00
|
|
|
/* Generated stub for json_to_address_scriptpubkey */
|
|
|
|
enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx UNNEEDED,
|
2018-12-16 05:50:06 +01:00
|
|
|
const struct chainparams *chainparams UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED, const u8 **scriptpubkey UNNEEDED)
|
2019-10-06 14:12:41 +02:00
|
|
|
{ fprintf(stderr, "json_to_address_scriptpubkey called!\n"); abort(); }
|
2021-06-14 23:07:38 +02:00
|
|
|
/* Generated stub for json_to_msat */
|
|
|
|
bool json_to_msat(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct amount_msat *msat UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_to_msat called!\n"); abort(); }
|
2019-04-08 11:58:32 +02:00
|
|
|
/* Generated stub for json_to_node_id */
|
|
|
|
bool json_to_node_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct node_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_to_node_id called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_to_number */
|
|
|
|
bool json_to_number(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
unsigned int *num UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_to_number called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for json_to_short_channel_id */
|
|
|
|
bool json_to_short_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
2019-09-06 08:41:41 +02:00
|
|
|
struct short_channel_id *scid UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "json_to_short_channel_id called!\n"); abort(); }
|
2022-07-04 05:49:38 +02:00
|
|
|
/* Generated stub for json_to_u16 */
|
|
|
|
bool json_to_u16(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
uint16_t *num UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_to_u16 called!\n"); abort(); }
|
|
|
|
/* Generated stub for json_tok_bin_from_hex */
|
|
|
|
u8 *json_tok_bin_from_hex(const tal_t *ctx UNNEEDED, const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_tok_bin_from_hex called!\n"); abort(); }
|
2020-03-10 17:54:09 +01:00
|
|
|
/* Generated stub for json_tok_channel_id */
|
|
|
|
bool json_tok_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct channel_id *cid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "json_tok_channel_id called!\n"); abort(); }
|
2021-06-14 23:07:38 +02:00
|
|
|
/* Generated stub for jsonrpc_request_end */
|
|
|
|
void jsonrpc_request_end(struct jsonrpc_request *request UNNEEDED)
|
|
|
|
{ fprintf(stderr, "jsonrpc_request_end called!\n"); abort(); }
|
|
|
|
/* Generated stub for jsonrpc_request_start_ */
|
|
|
|
struct jsonrpc_request *jsonrpc_request_start_(
|
|
|
|
const tal_t *ctx UNNEEDED, const char *method UNNEEDED, struct log *log UNNEEDED,
|
|
|
|
void (*notify_cb)(const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *idtok UNNEEDED,
|
|
|
|
const jsmntok_t *methodtok UNNEEDED,
|
|
|
|
const jsmntok_t *paramtoks UNNEEDED,
|
|
|
|
void *) UNNEEDED,
|
|
|
|
void (*response_cb)(const char *buffer UNNEEDED, const jsmntok_t *toks UNNEEDED,
|
|
|
|
const jsmntok_t *idtok UNNEEDED, void *) UNNEEDED,
|
|
|
|
void *response_cb_arg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "jsonrpc_request_start_ called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for kill_uncommitted_channel */
|
|
|
|
void kill_uncommitted_channel(struct uncommitted_channel *uc UNNEEDED,
|
|
|
|
const char *why UNNEEDED)
|
|
|
|
{ fprintf(stderr, "kill_uncommitted_channel called!\n"); abort(); }
|
|
|
|
/* Generated stub for log_ */
|
2019-11-17 12:41:33 +01:00
|
|
|
void log_(struct log *log UNNEEDED, enum log_level level UNNEEDED,
|
|
|
|
const struct node_id *node_id UNNEEDED,
|
|
|
|
bool call_notifier UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED, ...)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
|
|
|
{ fprintf(stderr, "log_ called!\n"); abort(); }
|
2022-03-23 00:01:33 +01:00
|
|
|
/* Generated stub for maybe_disconnect_peer */
|
|
|
|
void maybe_disconnect_peer(struct lightningd *ld UNNEEDED, struct peer *peer UNNEEDED)
|
|
|
|
{ fprintf(stderr, "maybe_disconnect_peer called!\n"); abort(); }
|
2021-01-13 09:58:38 +01:00
|
|
|
/* Generated stub for merkle_tlv */
|
|
|
|
void merkle_tlv(const struct tlv_field *fields UNNEEDED, struct sha256 *merkle UNNEEDED)
|
|
|
|
{ fprintf(stderr, "merkle_tlv called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for new_bolt11 */
|
2019-02-21 03:38:35 +01:00
|
|
|
struct bolt11 *new_bolt11(const tal_t *ctx UNNEEDED,
|
|
|
|
const struct amount_msat *msat TAKES UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "new_bolt11 called!\n"); abort(); }
|
2021-06-22 20:25:59 +02:00
|
|
|
/* Generated stub for new_height_states */
|
|
|
|
struct height_states *new_height_states(const tal_t *ctx UNNEEDED,
|
|
|
|
enum side opener UNNEEDED,
|
|
|
|
const u32 *blockheight UNNEEDED)
|
|
|
|
{ fprintf(stderr, "new_height_states called!\n"); abort(); }
|
2022-01-11 02:13:59 +01:00
|
|
|
/* Generated stub for new_peer_fd */
|
2022-01-29 04:33:05 +01:00
|
|
|
struct peer_fd *new_peer_fd(const tal_t *ctx UNNEEDED, int peer_fd UNNEEDED)
|
2022-01-11 02:13:59 +01:00
|
|
|
{ fprintf(stderr, "new_peer_fd called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for new_reltimer_ */
|
|
|
|
struct oneshot *new_reltimer_(struct timers *timers UNNEEDED,
|
|
|
|
const tal_t *ctx UNNEEDED,
|
|
|
|
struct timerel expire UNNEEDED,
|
|
|
|
void (*cb)(void *) UNNEEDED, void *arg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "new_reltimer_ called!\n"); abort(); }
|
2022-03-22 21:27:29 +01:00
|
|
|
/* Generated stub for new_uncommitted_channel */
|
|
|
|
struct uncommitted_channel *new_uncommitted_channel(struct peer *peer UNNEEDED)
|
|
|
|
{ fprintf(stderr, "new_uncommitted_channel called!\n"); abort(); }
|
|
|
|
/* Generated stub for new_unsaved_channel */
|
|
|
|
struct channel *new_unsaved_channel(struct peer *peer UNNEEDED,
|
|
|
|
u32 feerate_base UNNEEDED,
|
|
|
|
u32 feerate_ppm UNNEEDED)
|
|
|
|
{ fprintf(stderr, "new_unsaved_channel called!\n"); abort(); }
|
2019-04-08 11:58:32 +02:00
|
|
|
/* Generated stub for node_id_cmp */
|
|
|
|
int node_id_cmp(const struct node_id *a UNNEEDED, const struct node_id *b UNNEEDED)
|
|
|
|
{ fprintf(stderr, "node_id_cmp called!\n"); abort(); }
|
2018-12-13 13:58:40 +01:00
|
|
|
/* Generated stub for notify_connect */
|
2021-03-25 04:53:31 +01:00
|
|
|
void notify_connect(struct lightningd *ld UNNEEDED,
|
|
|
|
const struct node_id *nodeid UNNEEDED,
|
|
|
|
bool incoming UNNEEDED,
|
|
|
|
const struct wireaddr_internal *addr UNNEEDED)
|
2018-12-13 13:58:40 +01:00
|
|
|
{ fprintf(stderr, "notify_connect called!\n"); abort(); }
|
|
|
|
/* Generated stub for notify_disconnect */
|
2019-04-08 11:58:32 +02:00
|
|
|
void notify_disconnect(struct lightningd *ld UNNEEDED, struct node_id *nodeid UNNEEDED)
|
2018-12-13 13:58:40 +01:00
|
|
|
{ fprintf(stderr, "notify_disconnect called!\n"); abort(); }
|
2020-04-21 03:04:01 +02:00
|
|
|
/* Generated stub for notify_invoice_creation */
|
|
|
|
void notify_invoice_creation(struct lightningd *ld UNNEEDED, struct amount_msat *amount UNNEEDED,
|
|
|
|
struct preimage preimage UNNEEDED, const struct json_escape *label UNNEEDED)
|
|
|
|
{ fprintf(stderr, "notify_invoice_creation called!\n"); abort(); }
|
2019-07-21 13:39:15 +02:00
|
|
|
/* Generated stub for notify_invoice_payment */
|
|
|
|
void notify_invoice_payment(struct lightningd *ld UNNEEDED, struct amount_msat amount UNNEEDED,
|
|
|
|
struct preimage preimage UNNEEDED, const struct json_escape *label UNNEEDED)
|
|
|
|
{ fprintf(stderr, "notify_invoice_payment called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for onchaind_funding_spent */
|
|
|
|
enum watch_result onchaind_funding_spent(struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_tx *tx UNNEEDED,
|
2021-12-01 17:24:31 +01:00
|
|
|
u32 blockheight UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "onchaind_funding_spent called!\n"); abort(); }
|
|
|
|
/* Generated stub for param */
|
|
|
|
bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t params[] UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "param called!\n"); abort(); }
|
2018-12-16 05:50:06 +01:00
|
|
|
/* Generated stub for param_array */
|
|
|
|
struct command_result *param_array(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
const jsmntok_t **arr UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_array called!\n"); abort(); }
|
|
|
|
/* Generated stub for param_bool */
|
|
|
|
struct command_result *param_bool(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
bool **b UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_bool called!\n"); abort(); }
|
2019-09-30 18:31:27 +02:00
|
|
|
/* Generated stub for param_channel_id */
|
|
|
|
struct command_result *param_channel_id(struct command *cmd UNNEEDED,
|
|
|
|
const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct channel_id **cid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_channel_id called!\n"); abort(); }
|
2018-12-16 05:50:06 +01:00
|
|
|
/* Generated stub for param_escaped_string */
|
|
|
|
struct command_result *param_escaped_string(struct command *cmd UNNEEDED,
|
|
|
|
const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
const char **str UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_escaped_string called!\n"); abort(); }
|
|
|
|
/* Generated stub for param_label */
|
|
|
|
struct command_result *param_label(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
2019-06-12 02:38:54 +02:00
|
|
|
struct json_escape **label UNNEEDED)
|
2018-12-16 05:50:06 +01:00
|
|
|
{ fprintf(stderr, "param_label called!\n"); abort(); }
|
|
|
|
/* Generated stub for param_loglevel */
|
|
|
|
struct command_result *param_loglevel(struct command *cmd UNNEEDED,
|
|
|
|
const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
enum log_level **level UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_loglevel called!\n"); abort(); }
|
2019-03-09 21:29:39 +01:00
|
|
|
/* Generated stub for param_msat */
|
|
|
|
struct command_result *param_msat(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct amount_msat **msat UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_msat called!\n"); abort(); }
|
2019-04-08 11:58:32 +02:00
|
|
|
/* Generated stub for param_node_id */
|
|
|
|
struct command_result *param_node_id(struct command *cmd UNNEEDED,
|
2019-09-20 08:58:51 +02:00
|
|
|
const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct node_id **id UNNEEDED)
|
2019-04-08 11:58:32 +02:00
|
|
|
{ fprintf(stderr, "param_node_id called!\n"); abort(); }
|
2018-12-16 05:50:06 +01:00
|
|
|
/* Generated stub for param_number */
|
|
|
|
struct command_result *param_number(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
unsigned int **num UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_number called!\n"); abort(); }
|
2021-01-05 18:55:01 +01:00
|
|
|
/* Generated stub for param_sha256 */
|
|
|
|
struct command_result *param_sha256(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct sha256 **hash UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_sha256 called!\n"); abort(); }
|
2018-12-16 05:50:06 +01:00
|
|
|
/* Generated stub for param_short_channel_id */
|
|
|
|
struct command_result *param_short_channel_id(struct command *cmd UNNEEDED,
|
|
|
|
const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED,
|
|
|
|
const jsmntok_t *tok UNNEEDED,
|
|
|
|
struct short_channel_id **scid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_short_channel_id called!\n"); abort(); }
|
|
|
|
/* Generated stub for param_string */
|
|
|
|
struct command_result *param_string(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
const char **str UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_string called!\n"); abort(); }
|
|
|
|
/* Generated stub for param_u64 */
|
|
|
|
struct command_result *param_u64(struct command *cmd UNNEEDED, const char *name UNNEEDED,
|
|
|
|
const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
|
|
|
|
uint64_t **num UNNEEDED)
|
|
|
|
{ fprintf(stderr, "param_u64 called!\n"); abort(); }
|
2022-03-22 23:59:20 +01:00
|
|
|
/* Generated stub for peer_any_active_channel */
|
|
|
|
struct channel *peer_any_active_channel(struct peer *peer UNNEEDED, bool *others UNNEEDED)
|
|
|
|
{ fprintf(stderr, "peer_any_active_channel called!\n"); abort(); }
|
2021-01-08 02:05:06 +01:00
|
|
|
/* Generated stub for peer_restart_dualopend */
|
|
|
|
void peer_restart_dualopend(struct peer *peer UNNEEDED,
|
2022-01-11 02:13:59 +01:00
|
|
|
struct peer_fd *peer_fd UNNEEDED,
|
2021-06-03 05:23:05 +02:00
|
|
|
struct channel *channel UNNEEDED)
|
2021-01-08 02:05:06 +01:00
|
|
|
{ fprintf(stderr, "peer_restart_dualopend called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for peer_start_channeld */
|
|
|
|
void peer_start_channeld(struct channel *channel UNNEEDED,
|
2022-01-11 02:13:59 +01:00
|
|
|
struct peer_fd *peer_fd UNNEEDED,
|
2020-09-10 21:34:18 +02:00
|
|
|
const u8 *fwd_msg UNNEEDED,
|
2021-06-15 07:07:10 +02:00
|
|
|
bool reconnected UNNEEDED,
|
2022-03-22 21:27:30 +01:00
|
|
|
bool reestablish_only UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "peer_start_channeld called!\n"); abort(); }
|
2020-09-09 12:10:28 +02:00
|
|
|
/* Generated stub for peer_start_dualopend */
|
2022-03-22 21:27:29 +01:00
|
|
|
bool peer_start_dualopend(struct peer *peer UNNEEDED, struct peer_fd *peer_fd UNNEEDED,
|
|
|
|
struct channel *channel UNNEEDED)
|
2020-09-09 12:10:28 +02:00
|
|
|
{ fprintf(stderr, "peer_start_dualopend called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for peer_start_openingd */
|
2022-03-22 21:27:29 +01:00
|
|
|
bool peer_start_openingd(struct peer *peer UNNEEDED,
|
2022-01-11 02:13:59 +01:00
|
|
|
struct peer_fd *peer_fd UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "peer_start_openingd called!\n"); abort(); }
|
2019-01-19 15:56:05 +01:00
|
|
|
/* Generated stub for plugin_hook_call_ */
|
2020-05-05 03:11:59 +02:00
|
|
|
bool plugin_hook_call_(struct lightningd *ld UNNEEDED, const struct plugin_hook *hook UNNEEDED,
|
2020-05-04 09:19:53 +02:00
|
|
|
tal_t *cb_arg STEALS UNNEEDED)
|
2019-01-19 15:56:05 +01:00
|
|
|
{ fprintf(stderr, "plugin_hook_call_ called!\n"); abort(); }
|
2021-06-14 23:07:38 +02:00
|
|
|
/* Generated stub for plugin_request_send */
|
|
|
|
void plugin_request_send(struct plugin *plugin UNNEEDED,
|
|
|
|
struct jsonrpc_request *req TAKES UNNEEDED)
|
|
|
|
{ fprintf(stderr, "plugin_request_send called!\n"); abort(); }
|
2022-03-08 01:14:41 +01:00
|
|
|
/* Generated stub for report_subd_memleak */
|
|
|
|
void report_subd_memleak(struct leak_detect *leak_detect UNNEEDED, struct subd *leaker UNNEEDED)
|
|
|
|
{ fprintf(stderr, "report_subd_memleak called!\n"); abort(); }
|
2021-09-15 02:59:23 +02:00
|
|
|
/* Generated stub for resolve_close_command */
|
|
|
|
void resolve_close_command(struct lightningd *ld UNNEEDED, struct channel *channel UNNEEDED,
|
|
|
|
bool cooperative UNNEEDED)
|
|
|
|
{ fprintf(stderr, "resolve_close_command called!\n"); abort(); }
|
2022-03-08 01:14:41 +01:00
|
|
|
/* Generated stub for start_leak_request */
|
|
|
|
void start_leak_request(const struct subd_req *req UNNEEDED,
|
|
|
|
struct leak_detect *leak_detect UNNEEDED)
|
|
|
|
{ fprintf(stderr, "start_leak_request called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for subd_req_ */
|
2022-03-08 01:14:41 +01:00
|
|
|
struct subd_req *subd_req_(const tal_t *ctx UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
struct subd *sd UNNEEDED,
|
|
|
|
const u8 *msg_out UNNEEDED,
|
|
|
|
int fd_out UNNEEDED, size_t num_fds_in UNNEEDED,
|
|
|
|
void (*replycb)(struct subd * UNNEEDED, const u8 * UNNEEDED, const int * UNNEEDED, void *) UNNEEDED,
|
|
|
|
void *replycb_data UNNEEDED)
|
|
|
|
{ fprintf(stderr, "subd_req_ called!\n"); abort(); }
|
|
|
|
/* Generated stub for subd_send_msg */
|
|
|
|
void subd_send_msg(struct subd *sd UNNEEDED, const u8 *msg_out UNNEEDED)
|
|
|
|
{ fprintf(stderr, "subd_send_msg called!\n"); abort(); }
|
2020-05-16 03:29:05 +02:00
|
|
|
/* Generated stub for towire_bigsize */
|
|
|
|
void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_bigsize called!\n"); abort(); }
|
2020-05-15 12:29:53 +02:00
|
|
|
/* Generated stub for towire_channel_id */
|
|
|
|
void towire_channel_id(u8 **pptr UNNEEDED, const struct channel_id *channel_id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_channel_id called!\n"); abort(); }
|
2022-03-21 01:58:28 +01:00
|
|
|
/* Generated stub for towire_channeld_config_channel */
|
2022-03-21 01:58:54 +01:00
|
|
|
u8 *towire_channeld_config_channel(const tal_t *ctx UNNEEDED, u32 *feerate_base UNNEEDED, u32 *feerate_ppm UNNEEDED, struct amount_msat *htlc_minimum UNNEEDED, struct amount_msat *htlc_maximum UNNEEDED)
|
2022-03-21 01:58:28 +01:00
|
|
|
{ fprintf(stderr, "towire_channeld_config_channel called!\n"); abort(); }
|
2020-08-25 03:33:16 +02:00
|
|
|
/* Generated stub for towire_channeld_dev_memleak */
|
|
|
|
u8 *towire_channeld_dev_memleak(const tal_t *ctx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_channeld_dev_memleak called!\n"); abort(); }
|
|
|
|
/* Generated stub for towire_channeld_dev_reenable_commit */
|
|
|
|
u8 *towire_channeld_dev_reenable_commit(const tal_t *ctx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_channeld_dev_reenable_commit called!\n"); abort(); }
|
2021-06-03 05:22:21 +02:00
|
|
|
/* Generated stub for towire_connectd_peer_final_msg */
|
2022-01-08 14:29:29 +01:00
|
|
|
u8 *towire_connectd_peer_final_msg(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, const u8 *msg UNNEEDED)
|
2021-06-03 05:22:21 +02:00
|
|
|
{ fprintf(stderr, "towire_connectd_peer_final_msg called!\n"); abort(); }
|
2022-03-22 21:27:29 +01:00
|
|
|
/* Generated stub for towire_connectd_peer_make_active */
|
|
|
|
u8 *towire_connectd_peer_make_active(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, const struct channel_id *channel_id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_connectd_peer_make_active called!\n"); abort(); }
|
2022-03-08 01:31:26 +01:00
|
|
|
/* Generated stub for towire_dualopend_dev_memleak */
|
|
|
|
u8 *towire_dualopend_dev_memleak(const tal_t *ctx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_dualopend_dev_memleak called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for towire_errorfmt */
|
|
|
|
u8 *towire_errorfmt(const tal_t *ctx UNNEEDED,
|
|
|
|
const struct channel_id *channel UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "towire_errorfmt called!\n"); abort(); }
|
2022-02-23 19:11:03 +01:00
|
|
|
/* Generated stub for towire_gossipd_remote_addr */
|
|
|
|
u8 *towire_gossipd_remote_addr(const tal_t *ctx UNNEEDED, const struct wireaddr *remote_addr UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_gossipd_remote_addr called!\n"); abort(); }
|
2020-12-14 02:21:48 +01:00
|
|
|
/* Generated stub for towire_hsmd_sign_bolt12 */
|
2020-12-16 04:13:37 +01:00
|
|
|
u8 *towire_hsmd_sign_bolt12(const tal_t *ctx UNNEEDED, const wirestring *messagename UNNEEDED, const wirestring *fieldname UNNEEDED, const struct sha256 *merkleroot UNNEEDED, const u8 *publictweak UNNEEDED)
|
2020-12-14 02:21:48 +01:00
|
|
|
{ fprintf(stderr, "towire_hsmd_sign_bolt12 called!\n"); abort(); }
|
2020-08-25 03:55:38 +02:00
|
|
|
/* Generated stub for towire_hsmd_sign_commitment_tx */
|
2021-12-15 02:37:35 +01:00
|
|
|
u8 *towire_hsmd_sign_commitment_tx(const tal_t *ctx UNNEEDED, const struct node_id *peer_id UNNEEDED, u64 channel_dbid UNNEEDED, const struct bitcoin_tx *tx UNNEEDED, const struct pubkey *remote_funding_key UNNEEDED, u64 commit_num UNNEEDED)
|
2020-08-25 03:55:38 +02:00
|
|
|
{ fprintf(stderr, "towire_hsmd_sign_commitment_tx called!\n"); abort(); }
|
|
|
|
/* Generated stub for towire_hsmd_sign_invoice */
|
|
|
|
u8 *towire_hsmd_sign_invoice(const tal_t *ctx UNNEEDED, const u8 *u5bytes UNNEEDED, const u8 *hrp UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_hsmd_sign_invoice called!\n"); abort(); }
|
2020-05-16 03:29:05 +02:00
|
|
|
/* Generated stub for towire_node_id */
|
|
|
|
void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
|
2020-08-25 04:15:48 +02:00
|
|
|
/* Generated stub for towire_onchaind_dev_memleak */
|
|
|
|
u8 *towire_onchaind_dev_memleak(const tal_t *ctx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_onchaind_dev_memleak called!\n"); abort(); }
|
2022-03-08 01:14:41 +01:00
|
|
|
/* Generated stub for towire_openingd_dev_memleak */
|
|
|
|
u8 *towire_openingd_dev_memleak(const tal_t *ctx UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_openingd_dev_memleak called!\n"); abort(); }
|
2022-06-24 02:34:32 +02:00
|
|
|
/* Generated stub for towire_scb_chan */
|
|
|
|
void towire_scb_chan(u8 **p UNNEEDED, const struct scb_chan *scb_chan UNNEEDED)
|
|
|
|
{ fprintf(stderr, "towire_scb_chan called!\n"); abort(); }
|
2021-02-03 03:51:41 +01:00
|
|
|
/* Generated stub for towire_warningfmt */
|
|
|
|
u8 *towire_warningfmt(const tal_t *ctx UNNEEDED,
|
|
|
|
const struct channel_id *channel UNNEEDED,
|
|
|
|
const char *fmt UNNEEDED, ...)
|
|
|
|
{ fprintf(stderr, "towire_warningfmt called!\n"); abort(); }
|
2022-01-11 02:15:48 +01:00
|
|
|
/* Generated stub for try_reconnect */
|
2022-03-22 21:30:59 +01:00
|
|
|
void try_reconnect(const tal_t *ctx UNNEEDED,
|
|
|
|
struct peer *peer UNNEEDED,
|
|
|
|
u32 seconds_delay UNNEEDED,
|
|
|
|
const struct wireaddr_internal *addrhint UNNEEDED)
|
2022-01-11 02:15:48 +01:00
|
|
|
{ fprintf(stderr, "try_reconnect called!\n"); abort(); }
|
2018-11-15 14:08:10 +01:00
|
|
|
/* Generated stub for version */
|
|
|
|
const char *version(void)
|
|
|
|
{ fprintf(stderr, "version called!\n"); abort(); }
|
2019-10-03 19:31:00 +02:00
|
|
|
/* Generated stub for wallet_annotate_txout */
|
2021-10-13 05:45:36 +02:00
|
|
|
void wallet_annotate_txout(struct wallet *w UNNEEDED,
|
|
|
|
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
|
|
|
enum wallet_tx_type type UNNEEDED, u64 channel UNNEEDED)
|
2019-10-03 19:31:00 +02:00
|
|
|
{ fprintf(stderr, "wallet_annotate_txout called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_channel_save */
|
|
|
|
void wallet_channel_save(struct wallet *w UNNEEDED, struct channel *chan UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_channel_save called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_channel_stats_load */
|
|
|
|
void wallet_channel_stats_load(struct wallet *w UNNEEDED, u64 cdbid UNNEEDED, struct channel_stats *stats UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_channel_stats_load called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_channeltxs_add */
|
|
|
|
void wallet_channeltxs_add(struct wallet *w UNNEEDED, struct channel *chan UNNEEDED,
|
|
|
|
const int type UNNEEDED, const struct bitcoin_txid *txid UNNEEDED,
|
|
|
|
const u32 input_num UNNEEDED, const u32 blockheight UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_channeltxs_add called!\n"); abort(); }
|
2019-12-12 00:39:10 +01:00
|
|
|
/* Generated stub for wallet_htlcs_load_in_for_channel */
|
|
|
|
bool wallet_htlcs_load_in_for_channel(struct wallet *wallet UNNEEDED,
|
|
|
|
struct channel *chan UNNEEDED,
|
|
|
|
struct htlc_in_map *htlcs_in UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_htlcs_load_in_for_channel called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_htlcs_load_out_for_channel */
|
|
|
|
bool wallet_htlcs_load_out_for_channel(struct wallet *wallet UNNEEDED,
|
|
|
|
struct channel *chan UNNEEDED,
|
|
|
|
struct htlc_out_map *htlcs_out UNNEEDED,
|
|
|
|
struct htlc_in_map *remaining_htlcs_in UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_htlcs_load_out_for_channel called!\n"); abort(); }
|
2019-08-27 06:20:05 +02:00
|
|
|
/* Generated stub for wallet_init_channels */
|
|
|
|
bool wallet_init_channels(struct wallet *w UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_init_channels called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_invoice_create */
|
|
|
|
bool wallet_invoice_create(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice *pinvoice UNNEEDED,
|
2019-02-21 03:38:35 +01:00
|
|
|
const struct amount_msat *msat TAKES UNNEEDED,
|
2019-06-12 02:38:54 +02:00
|
|
|
const struct json_escape *label TAKES UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
u64 expiry UNNEEDED,
|
|
|
|
const char *b11enc UNNEEDED,
|
|
|
|
const char *description UNNEEDED,
|
2019-11-23 01:19:23 +01:00
|
|
|
const u8 *features UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
const struct preimage *r UNNEEDED,
|
2020-12-14 02:18:24 +01:00
|
|
|
const struct sha256 *rhash UNNEEDED,
|
|
|
|
const struct sha256 *local_offer_id UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "wallet_invoice_create called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_delete */
|
|
|
|
bool wallet_invoice_delete(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice invoice UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_delete called!\n"); abort(); }
|
2022-03-24 00:57:28 +01:00
|
|
|
/* Generated stub for wallet_invoice_delete_description */
|
|
|
|
bool wallet_invoice_delete_description(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice invoice UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_delete_description called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_invoice_delete_expired */
|
|
|
|
void wallet_invoice_delete_expired(struct wallet *wallet UNNEEDED,
|
|
|
|
u64 max_expiry_time UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_delete_expired called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_details */
|
2022-03-24 00:57:28 +01:00
|
|
|
struct invoice_details *wallet_invoice_details(const tal_t *ctx UNNEEDED,
|
|
|
|
struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice invoice UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "wallet_invoice_details called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_find_by_label */
|
|
|
|
bool wallet_invoice_find_by_label(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice *pinvoice UNNEEDED,
|
2019-06-12 02:38:54 +02:00
|
|
|
const struct json_escape *label UNNEEDED)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{ fprintf(stderr, "wallet_invoice_find_by_label called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_find_by_rhash */
|
|
|
|
bool wallet_invoice_find_by_rhash(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice *pinvoice UNNEEDED,
|
|
|
|
const struct sha256 *rhash UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_find_by_rhash called!\n"); abort(); }
|
2019-04-11 02:08:55 +02:00
|
|
|
/* Generated stub for wallet_invoice_find_unpaid */
|
|
|
|
bool wallet_invoice_find_unpaid(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice *pinvoice UNNEEDED,
|
|
|
|
const struct sha256 *rhash UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_find_unpaid called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_invoice_iterate */
|
|
|
|
bool wallet_invoice_iterate(struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice_iterator *it UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_iterate called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_iterator_deref */
|
|
|
|
const struct invoice_details *wallet_invoice_iterator_deref(const tal_t *ctx UNNEEDED,
|
|
|
|
struct wallet *wallet UNNEEDED,
|
|
|
|
const struct invoice_iterator *it UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_iterator_deref called!\n"); abort(); }
|
2019-04-11 02:08:55 +02:00
|
|
|
/* Generated stub for wallet_invoice_resolve */
|
2020-12-02 03:30:59 +01:00
|
|
|
bool wallet_invoice_resolve(struct wallet *wallet UNNEEDED,
|
2019-04-11 02:08:55 +02:00
|
|
|
struct invoice invoice UNNEEDED,
|
|
|
|
struct amount_msat received UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_resolve called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_invoice_waitany */
|
|
|
|
void wallet_invoice_waitany(const tal_t *ctx UNNEEDED,
|
|
|
|
struct wallet *wallet UNNEEDED,
|
|
|
|
u64 lastpay_index UNNEEDED,
|
|
|
|
void (*cb)(const struct invoice * UNNEEDED, void*) UNNEEDED,
|
|
|
|
void *cbarg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_waitany called!\n"); abort(); }
|
|
|
|
/* Generated stub for wallet_invoice_waitone */
|
|
|
|
void wallet_invoice_waitone(const tal_t *ctx UNNEEDED,
|
|
|
|
struct wallet *wallet UNNEEDED,
|
|
|
|
struct invoice invoice UNNEEDED,
|
|
|
|
void (*cb)(const struct invoice * UNNEEDED, void*) UNNEEDED,
|
|
|
|
void *cbarg UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_invoice_waitone called!\n"); abort(); }
|
2020-12-14 02:21:48 +01:00
|
|
|
/* Generated stub for wallet_offer_find */
|
|
|
|
char *wallet_offer_find(const tal_t *ctx UNNEEDED,
|
|
|
|
struct wallet *w UNNEEDED,
|
|
|
|
const struct sha256 *offer_id UNNEEDED,
|
|
|
|
const struct json_escape **label UNNEEDED,
|
|
|
|
enum offer_status *status)
|
|
|
|
|
|
|
|
{ fprintf(stderr, "wallet_offer_find called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_peer_delete */
|
|
|
|
void wallet_peer_delete(struct wallet *w UNNEEDED, u64 peer_dbid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_peer_delete called!\n"); abort(); }
|
2020-10-28 11:46:23 +01:00
|
|
|
/* Generated stub for wallet_state_change_get */
|
|
|
|
struct state_change_entry *wallet_state_change_get(struct wallet *w UNNEEDED,
|
|
|
|
const tal_t *ctx UNNEEDED,
|
|
|
|
u64 channel_id UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_state_change_get called!\n"); abort(); }
|
2018-11-15 14:08:10 +01:00
|
|
|
/* Generated stub for wallet_total_forward_fees */
|
2019-02-21 04:45:55 +01:00
|
|
|
struct amount_msat wallet_total_forward_fees(struct wallet *w UNNEEDED)
|
2018-11-15 14:08:10 +01:00
|
|
|
{ fprintf(stderr, "wallet_total_forward_fees called!\n"); abort(); }
|
2019-05-24 12:27:40 +02:00
|
|
|
/* Generated stub for wallet_transaction_add */
|
2020-08-07 03:30:47 +02:00
|
|
|
void wallet_transaction_add(struct wallet *w UNNEEDED, const struct wally_tx *tx UNNEEDED,
|
2019-05-24 12:27:40 +02:00
|
|
|
const u32 blockheight UNNEEDED, const u32 txindex UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_transaction_add called!\n"); abort(); }
|
2019-05-23 23:19:49 +02:00
|
|
|
/* Generated stub for wallet_transaction_annotate */
|
|
|
|
void wallet_transaction_annotate(struct wallet *w UNNEEDED,
|
2019-06-07 11:38:20 +02:00
|
|
|
const struct bitcoin_txid *txid UNNEEDED,
|
|
|
|
enum wallet_tx_type type UNNEEDED, u64 channel_id UNNEEDED)
|
2019-05-23 23:19:49 +02:00
|
|
|
{ fprintf(stderr, "wallet_transaction_annotate called!\n"); abort(); }
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Generated stub for wallet_transaction_locate */
|
|
|
|
struct txlocator *wallet_transaction_locate(const tal_t *ctx UNNEEDED, struct wallet *w UNNEEDED,
|
|
|
|
const struct bitcoin_txid *txid UNNEEDED)
|
|
|
|
{ fprintf(stderr, "wallet_transaction_locate called!\n"); abort(); }
|
|
|
|
/* Generated stub for watch_txid */
|
|
|
|
struct txwatch *watch_txid(const tal_t *ctx UNNEEDED,
|
|
|
|
struct chain_topology *topo UNNEEDED,
|
|
|
|
struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_txid *txid UNNEEDED,
|
|
|
|
enum watch_result (*cb)(struct lightningd *ld UNNEEDED,
|
|
|
|
struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_txid * UNNEEDED,
|
2019-06-28 03:58:31 +02:00
|
|
|
const struct bitcoin_tx * UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
unsigned int depth))
|
|
|
|
{ fprintf(stderr, "watch_txid called!\n"); abort(); }
|
|
|
|
/* Generated stub for watch_txo */
|
|
|
|
struct txowatch *watch_txo(const tal_t *ctx UNNEEDED,
|
|
|
|
struct chain_topology *topo UNNEEDED,
|
|
|
|
struct channel *channel UNNEEDED,
|
2021-10-13 05:45:36 +02:00
|
|
|
const struct bitcoin_outpoint *outpoint UNNEEDED,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
enum watch_result (*cb)(struct channel *channel UNNEEDED,
|
|
|
|
const struct bitcoin_tx *tx UNNEEDED,
|
|
|
|
size_t input_num UNNEEDED,
|
|
|
|
const struct block *block))
|
|
|
|
{ fprintf(stderr, "watch_txo called!\n"); abort(); }
|
|
|
|
/* AUTOGENERATED MOCKS END */
|
|
|
|
|
|
|
|
#if DEVELOPER
|
|
|
|
/* Generated stub for dev_disconnect_permanent */
|
|
|
|
bool dev_disconnect_permanent(struct lightningd *ld UNNEEDED)
|
|
|
|
{ fprintf(stderr, "dev_disconnect_permanent called!\n"); abort(); }
|
|
|
|
#endif
|
|
|
|
|
2020-09-08 06:57:53 +02:00
|
|
|
static void add_candidate(struct routehint_candidate **candidates, int n,
|
|
|
|
struct channel *c)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{
|
2020-09-08 06:57:53 +02:00
|
|
|
struct routehint_candidate candidate;
|
|
|
|
|
|
|
|
candidate.r = tal(*candidates, struct route_info);
|
|
|
|
memset(&candidate.r->pubkey, n, sizeof(candidate.r->pubkey));
|
|
|
|
memset(&candidate.r->short_channel_id, n,
|
|
|
|
sizeof(candidate.r->short_channel_id));
|
|
|
|
candidate.r->fee_base_msat
|
|
|
|
= candidate.r->fee_proportional_millionths
|
|
|
|
= candidate.r->cltv_expiry_delta
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
= n;
|
2020-09-08 06:57:53 +02:00
|
|
|
candidate.c = c;
|
|
|
|
candidate.capacity = amount_msat(n * 1000 - 1);
|
|
|
|
tal_arr_expand(candidates, candidate);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
}
|
|
|
|
|
2020-09-08 06:57:53 +02:00
|
|
|
static struct channel *add_peer(struct lightningd *ld, int n,
|
|
|
|
enum channel_state state,
|
|
|
|
bool connected)
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{
|
|
|
|
struct peer *peer = tal(ld, struct peer);
|
|
|
|
struct channel *c = tal(peer, struct channel);
|
|
|
|
|
|
|
|
memset(&peer->id, n, sizeof(peer->id));
|
|
|
|
list_head_init(&peer->channels);
|
|
|
|
list_add_tail(&ld->peers, &peer->list);
|
2020-09-08 05:49:35 +02:00
|
|
|
peer->ld = ld;
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
|
|
|
c->state = state;
|
|
|
|
c->owner = connected ? (void *)peer : NULL;
|
2020-09-08 05:49:35 +02:00
|
|
|
c->opener = LOCAL;
|
|
|
|
c->peer = peer;
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
/* Channel has incoming capacity n*1000 - 1 millisatoshi */
|
2021-10-13 05:45:36 +02:00
|
|
|
c->funding_sats.satoshis = n+1;
|
2019-02-21 04:45:55 +01:00
|
|
|
c->our_msat = AMOUNT_MSAT(1);
|
|
|
|
c->our_config.channel_reserve = AMOUNT_SAT(1);
|
2020-09-08 05:49:35 +02:00
|
|
|
c->our_config.htlc_minimum = AMOUNT_MSAT(0);
|
2019-04-09 17:35:28 +02:00
|
|
|
c->channel_info.their_config.channel_reserve = AMOUNT_SAT(0);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
list_add_tail(&peer->channels, &c->list);
|
2020-09-08 06:57:53 +02:00
|
|
|
|
|
|
|
return c;
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
}
|
|
|
|
|
2019-04-08 11:58:32 +02:00
|
|
|
/* There *is* padding in this structure, after pubkey and after cltv_expiry_delta. */
|
|
|
|
STRUCTEQ_DEF(route_info,
|
|
|
|
ALIGNOF(struct short_channel_id) - 1 - sizeof(u16),
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
pubkey,
|
2019-04-08 11:58:32 +02:00
|
|
|
cltv_expiry_delta,
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
short_channel_id,
|
|
|
|
fee_base_msat,
|
2019-04-08 11:58:32 +02:00
|
|
|
fee_proportional_millionths);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2020-12-02 01:10:04 +01:00
|
|
|
int main(int argc, char *argv[])
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
{
|
|
|
|
struct lightningd *ld;
|
2020-09-08 06:57:53 +02:00
|
|
|
struct routehint_candidate *candidates;
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
struct route_info **ret;
|
|
|
|
size_t n;
|
|
|
|
|
2020-12-02 01:10:04 +01:00
|
|
|
common_setup(argv[0]);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
ld = tal(tmpctx, struct lightningd);
|
|
|
|
|
|
|
|
list_head_init(&ld->peers);
|
2020-09-08 05:49:35 +02:00
|
|
|
htlc_in_map_init(&ld->htlcs_in);
|
|
|
|
chainparams = chainparams_for_network("regtest");
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2020-09-08 06:57:53 +02:00
|
|
|
candidates = tal_arr(tmpctx, struct routehint_candidate, 0);
|
2019-12-17 07:11:08 +01:00
|
|
|
|
2019-04-09 17:35:28 +02:00
|
|
|
/* 1. Nothing to choose from -> NULL result. */
|
2020-09-08 06:57:53 +02:00
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(0), candidates);
|
|
|
|
assert(tal_count(ret) == 0);
|
|
|
|
|
|
|
|
/* 2. One peer (999 msat capacity) */
|
|
|
|
add_candidate(&candidates, 1, add_peer(ld, 1, CHANNELD_NORMAL, true));
|
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(1000), candidates);
|
|
|
|
assert(tal_count(ret) == 0);
|
|
|
|
|
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(999), candidates);
|
|
|
|
assert(tal_count(ret) == 1);
|
|
|
|
assert(tal_count(ret[0]) == 1);
|
|
|
|
assert(route_info_eq(ret[0], candidates[0].r));
|
|
|
|
|
|
|
|
/* 3. Two peers (999 msat capacity and 1999 msat) */
|
|
|
|
add_candidate(&candidates, 2, add_peer(ld, 2, CHANNELD_NORMAL, true));
|
|
|
|
|
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(1000), candidates);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
assert(tal_count(ret) == 1);
|
|
|
|
assert(tal_count(ret[0]) == 1);
|
2020-09-08 06:57:53 +02:00
|
|
|
assert(route_info_eq(ret[0], candidates[1].r));
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2019-04-09 17:35:28 +02:00
|
|
|
/* 7. Correct peer with just enough capacity_to_pay_us */
|
2020-09-08 06:57:53 +02:00
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(1999), candidates);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
assert(tal_count(ret) == 1);
|
|
|
|
assert(tal_count(ret[0]) == 1);
|
2020-09-08 06:57:53 +02:00
|
|
|
assert(route_info_eq(ret[0], candidates[1].r));
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2019-04-09 17:35:28 +02:00
|
|
|
/* 8. Not if we ask for too much! Our balance is 1msat. */
|
2020-09-08 06:57:53 +02:00
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(2000), candidates);
|
|
|
|
assert(tal_count(ret) == 0);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2020-09-08 06:57:53 +02:00
|
|
|
/* 9. Add another peer (2999 capacity) */
|
|
|
|
add_candidate(&candidates, 3, add_peer(ld, 3, CHANNELD_NORMAL, true));
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2019-04-09 17:35:28 +02:00
|
|
|
/* Simulate selection ratios between excesses 25% and 50% of capacity*/
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
for (size_t i = n = 0; i < 1000; i++) {
|
2020-09-08 06:57:53 +02:00
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(1499), candidates);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
assert(tal_count(ret) == 1);
|
|
|
|
assert(tal_count(ret[0]) == 1);
|
2020-09-08 06:57:53 +02:00
|
|
|
assert(route_info_eq(ret[0], candidates[1].r)
|
|
|
|
|| route_info_eq(ret[0], candidates[2].r));
|
|
|
|
n += route_info_eq(ret[0], candidates[1].r);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Handwave over probability of this happening! Within 20% */
|
2019-04-09 17:35:28 +02:00
|
|
|
printf("Number of selections with excess 25 percent of capacity: %zu\n"
|
|
|
|
"Number of selections with excess 50 percent of capacity: %zu\n",
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
n, 1000 - n);
|
2019-04-09 17:35:28 +02:00
|
|
|
assert(n > 333 - 66 && n < 333 + 66);
|
|
|
|
|
2020-09-08 06:57:53 +02:00
|
|
|
/* 10. Last peer's capacity goes from 3 to 2 sat */
|
|
|
|
candidates[2].c->channel_info.their_config.channel_reserve = AMOUNT_SAT(1);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
|
|
|
for (size_t i = n = 0; i < 1000; i++) {
|
2020-09-08 06:57:53 +02:00
|
|
|
ret = select_inchan(tmpctx, ld, AMOUNT_MSAT(1499), candidates);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
assert(tal_count(ret) == 1);
|
|
|
|
assert(tal_count(ret[0]) == 1);
|
2020-09-08 06:57:53 +02:00
|
|
|
assert(route_info_eq(ret[0], candidates[1].r)
|
|
|
|
|| route_info_eq(ret[0], candidates[2].r));
|
|
|
|
n += route_info_eq(ret[0], candidates[1].r);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
}
|
|
|
|
|
2019-04-09 17:35:28 +02:00
|
|
|
/* Handwave over probability of this happening! Within 20% */
|
|
|
|
printf("Number of selections with excess 25 percent of capacity: %zu\n"
|
|
|
|
"Number of selections with excess 75 percent of capacity: %zu\n",
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
n, 1000 - n);
|
2019-04-09 17:35:28 +02:00
|
|
|
assert(n > 250 - 50 && n < 250 + 50);
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
2020-12-02 01:10:04 +01:00
|
|
|
common_shutdown();
|
json-invoice: add routeboost, warnings.
We split json_invoice(), as it now needs to round-trip to the gossipd,
and uniqueness checks need to happen *after* gossipd replies to avoid
a race.
For every candidate channel gossipd gives us, we check that it's in
state NORMAL (not shutting down, not still waiting for lockin), that
it's connected, and that it has capacity. We then choose one with
probability weighted by excess capacity, so larger channels are more
likely.
As a side effect of this, we can tell if an invoice is unpayble (no
channels have sufficient incoming capacity) or difficuly (no *online*
channels have sufficient capacity), so we add those warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-27 07:29:17 +02:00
|
|
|
|
|
|
|
/* FIXME: Do BOLT comparison! */
|
|
|
|
return 0;
|
|
|
|
}
|