Makefile: create generic wiregen rules, use for channeld.

This means some files get renamed, and I took the opportunity to clarify
our naming (the *d* is important!)

1. channeld/channel_wire.csv -> channeld/channeld_wire.csv
2. channeld/gen_channel_wire.h -> channeld/channeld_wiregen.h
3. enum channel_wire_type -> enum channeld_wire
4. WIRE_CHANNEL_FUNDING_DEPTH -> WIRE_CHANNELD_FUNDING_DEPTH.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-25 11:03:16 +09:30
parent 7804d89ef1
commit 8ae6740bb1
13 changed files with 434 additions and 439 deletions

View File

@@ -1,7 +1,7 @@
#include <bitcoin/pubkey.h>
#include <bitcoin/script.h>
#include <ccan/cast/cast.h>
#include <channeld/gen_channel_wire.h>
#include <channeld/channeld_wiregen.h>
#include <common/coin_mvt.h>
#include <common/features.h>
#include <common/gossip_constants.h>
@@ -39,10 +39,10 @@ static void update_feerates(struct lightningd *ld, struct channel *channel)
if (!feerate)
return;
msg = towire_channel_feerates(NULL, feerate,
feerate_min(ld, NULL),
feerate_max(ld, NULL),
try_get_feerate(ld->topology, FEERATE_PENALTY));
msg = towire_channeld_feerates(NULL, feerate,
feerate_min(ld, NULL),
feerate_max(ld, NULL),
try_get_feerate(ld->topology, FEERATE_PENALTY));
subd_send_msg(channel->owner, take(msg));
}
@@ -156,7 +156,7 @@ static void peer_got_funding_locked(struct channel *channel, const u8 *msg)
{
struct pubkey next_per_commitment_point;
if (!fromwire_channel_got_funding_locked(msg,
if (!fromwire_channeld_got_funding_locked(msg,
&next_per_commitment_point)) {
channel_internal_error(channel,
"bad channel_got_funding_locked %s",
@@ -183,7 +183,7 @@ static void peer_got_announcement(struct channel *channel, const u8 *msg)
secp256k1_ecdsa_signature remote_ann_node_sig;
secp256k1_ecdsa_signature remote_ann_bitcoin_sig;
if (!fromwire_channel_got_announcement(msg,
if (!fromwire_channeld_got_announcement(msg,
&remote_ann_node_sig,
&remote_ann_bitcoin_sig)) {
channel_internal_error(channel,
@@ -202,7 +202,7 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg)
u8 *scriptpubkey;
struct lightningd *ld = channel->peer->ld;
if (!fromwire_channel_got_shutdown(channel, msg, &scriptpubkey)) {
if (!fromwire_channeld_got_shutdown(channel, msg, &scriptpubkey)) {
channel_internal_error(channel, "bad channel_got_shutdown %s",
tal_hex(msg, msg));
return;
@@ -243,7 +243,7 @@ static void peer_got_shutdown(struct channel *channel, const u8 *msg)
static void channel_fail_fallen_behind(struct channel *channel, const u8 *msg)
{
if (!fromwire_channel_fail_fallen_behind(channel, msg,
if (!fromwire_channeld_fail_fallen_behind(channel, msg,
cast_const2(struct pubkey **,
&channel->future_per_commitment_point))) {
channel_internal_error(channel,
@@ -277,7 +277,7 @@ static void peer_start_closingd_after_shutdown(struct channel *channel,
{
struct per_peer_state *pps;
if (!fromwire_channel_shutdown_complete(tmpctx, msg, &pps)) {
if (!fromwire_channeld_shutdown_complete(tmpctx, msg, &pps)) {
channel_internal_error(channel, "bad shutdown_complete: %s",
tal_hex(msg, msg));
return;
@@ -312,7 +312,7 @@ static void forget(struct channel *channel)
static void handle_error_channel(struct channel *channel,
const u8 *msg)
{
if (!fromwire_channel_send_error_reply(msg)) {
if (!fromwire_channeld_send_error_reply(msg)) {
channel_internal_error(channel, "bad send_error_reply: %s",
tal_hex(tmpctx, msg));
return;
@@ -333,44 +333,44 @@ void forget_channel(struct channel *channel, const char *why)
* we just directly remove the channel */
if (channel->owner)
subd_send_msg(channel->owner,
take(towire_channel_send_error(NULL, why)));
take(towire_channeld_send_error(NULL, why)));
else
forget(channel);
}
static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds)
{
enum channel_wire_type t = fromwire_peektype(msg);
enum channeld_wire t = fromwire_peektype(msg);
switch (t) {
case WIRE_CHANNEL_SENDING_COMMITSIG:
case WIRE_CHANNELD_SENDING_COMMITSIG:
peer_sending_commitsig(sd->channel, msg);
break;
case WIRE_CHANNEL_GOT_COMMITSIG:
case WIRE_CHANNELD_GOT_COMMITSIG:
peer_got_commitsig(sd->channel, msg);
break;
case WIRE_CHANNEL_GOT_REVOKE:
case WIRE_CHANNELD_GOT_REVOKE:
peer_got_revoke(sd->channel, msg);
break;
case WIRE_CHANNEL_GOT_FUNDING_LOCKED:
case WIRE_CHANNELD_GOT_FUNDING_LOCKED:
peer_got_funding_locked(sd->channel, msg);
break;
case WIRE_CHANNEL_GOT_ANNOUNCEMENT:
case WIRE_CHANNELD_GOT_ANNOUNCEMENT:
peer_got_announcement(sd->channel, msg);
break;
case WIRE_CHANNEL_GOT_SHUTDOWN:
case WIRE_CHANNELD_GOT_SHUTDOWN:
peer_got_shutdown(sd->channel, msg);
break;
case WIRE_CHANNEL_SHUTDOWN_COMPLETE:
case WIRE_CHANNELD_SHUTDOWN_COMPLETE:
/* We expect 3 fds. */
if (!fds)
return 3;
peer_start_closingd_after_shutdown(sd->channel, msg, fds);
break;
case WIRE_CHANNEL_FAIL_FALLEN_BEHIND:
case WIRE_CHANNELD_FAIL_FALLEN_BEHIND:
channel_fail_fallen_behind(sd->channel, msg);
break;
case WIRE_CHANNEL_SEND_ERROR_REPLY:
case WIRE_CHANNELD_SEND_ERROR_REPLY:
handle_error_channel(sd->channel, msg);
break;
#if EXPERIMENTAL_FEATURES
@@ -385,25 +385,25 @@ static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds)
case WIRE_GOT_ONIONMSG_FORWARD:
#endif
/* And we never get these from channeld. */
case WIRE_CHANNEL_INIT:
case WIRE_CHANNEL_FUNDING_DEPTH:
case WIRE_CHANNEL_OFFER_HTLC:
case WIRE_CHANNEL_FULFILL_HTLC:
case WIRE_CHANNEL_FAIL_HTLC:
case WIRE_CHANNEL_GOT_COMMITSIG_REPLY:
case WIRE_CHANNEL_GOT_REVOKE_REPLY:
case WIRE_CHANNEL_SENDING_COMMITSIG_REPLY:
case WIRE_CHANNEL_SEND_SHUTDOWN:
case WIRE_CHANNEL_DEV_REENABLE_COMMIT:
case WIRE_CHANNEL_FEERATES:
case WIRE_CHANNEL_SPECIFIC_FEERATES:
case WIRE_CHANNEL_DEV_MEMLEAK:
case WIRE_CHANNELD_INIT:
case WIRE_CHANNELD_FUNDING_DEPTH:
case WIRE_CHANNELD_OFFER_HTLC:
case WIRE_CHANNELD_FULFILL_HTLC:
case WIRE_CHANNELD_FAIL_HTLC:
case WIRE_CHANNELD_GOT_COMMITSIG_REPLY:
case WIRE_CHANNELD_GOT_REVOKE_REPLY:
case WIRE_CHANNELD_SENDING_COMMITSIG_REPLY:
case WIRE_CHANNELD_SEND_SHUTDOWN:
case WIRE_CHANNELD_DEV_REENABLE_COMMIT:
case WIRE_CHANNELD_FEERATES:
case WIRE_CHANNELD_SPECIFIC_FEERATES:
case WIRE_CHANNELD_DEV_MEMLEAK:
case WIRE_SEND_ONIONMSG:
/* Replies go to requests. */
case WIRE_CHANNEL_OFFER_HTLC_REPLY:
case WIRE_CHANNEL_DEV_REENABLE_COMMIT_REPLY:
case WIRE_CHANNEL_DEV_MEMLEAK_REPLY:
case WIRE_CHANNEL_SEND_ERROR:
case WIRE_CHANNELD_OFFER_HTLC_REPLY:
case WIRE_CHANNELD_DEV_REENABLE_COMMIT_REPLY:
case WIRE_CHANNELD_DEV_MEMLEAK_REPLY:
case WIRE_CHANNELD_SEND_ERROR:
break;
}
@@ -453,7 +453,7 @@ void peer_start_channeld(struct channel *channel,
"lightning_channeld", channel,
&channel->peer->id,
channel->log, true,
channel_wire_type_name,
channeld_wire_name,
channel_msg,
channel_errmsg,
channel_set_billboard,
@@ -521,7 +521,7 @@ void peer_start_channeld(struct channel *channel,
pbases = wallet_penalty_base_load_for_channel(
tmpctx, channel->peer->ld->wallet, channel->dbid);
initmsg = towire_channel_init(tmpctx,
initmsg = towire_channeld_init(tmpctx,
chainparams,
ld->our_features,
&channel->funding_txid,
@@ -614,7 +614,7 @@ bool channel_tell_depth(struct lightningd *ld,
}
subd_send_msg(channel->owner,
take(towire_channel_funding_depth(NULL, channel->scid,
take(towire_channeld_funding_depth(NULL, channel->scid,
depth)));
if (channel->remote_funding_locked
@@ -867,7 +867,7 @@ static struct command_result *json_dev_feerate(struct command *cmd,
if (!channel || !channel->owner || channel->state != CHANNELD_NORMAL)
return command_fail(cmd, LIGHTNINGD, "Peer bad state");
msg = towire_channel_feerates(NULL, *feerate,
msg = towire_channeld_feerates(NULL, *feerate,
feerate_min(cmd->ld, NULL),
feerate_max(cmd->ld, NULL),
try_get_feerate(cmd->ld->topology, FEERATE_PENALTY));

View File

@@ -1,4 +1,4 @@
#include <channeld/gen_channel_wire.h>
#include <channeld/channeld_wiregen.h>
#include <common/json_helpers.h>
#include <lightningd/channel.h>
#include <lightningd/lightningd.h>
@@ -63,13 +63,13 @@ static bool make_peer_send(struct lightningd *ld,
if (!dst) {
log_debug(ld->log, "Can't send %s: no channel",
channel_wire_type_name(fromwire_peektype(msg)));
channeld_wire_name(fromwire_peektype(msg)));
return false;
}
if (!dst->owner) {
log_debug(ld->log, "Can't send %s: not connected",
channel_wire_type_name(fromwire_peektype(msg)));
channeld_wire_name(fromwire_peektype(msg)));
return false;
}
@@ -77,7 +77,7 @@ static bool make_peer_send(struct lightningd *ld,
* allow incoming via openingd!. */
if (!streq(dst->owner->name, "channeld")) {
log_debug(ld->log, "Can't send %s: owned by %s",
channel_wire_type_name(fromwire_peektype(msg)),
channeld_wire_name(fromwire_peektype(msg)),
dst->owner->name);
return false;
}

View File

@@ -13,7 +13,7 @@
#include <ccan/str/str.h>
#include <ccan/take/take.h>
#include <ccan/tal/str/str.h>
#include <channeld/gen_channel_wire.h>
#include <channeld/channeld_wiregen.h>
#include <common/addr.h>
#include <common/closing_fee.h>
#include <common/dev_disconnect.h>
@@ -1435,7 +1435,7 @@ static struct command_result *json_close(struct command *cmd,
case CHANNELD_SHUTTING_DOWN:
if (channel->owner)
subd_send_msg(channel->owner,
take(towire_channel_send_shutdown(NULL,
take(towire_channeld_send_shutdown(NULL,
channel->shutdown_scriptpubkey[LOCAL])));
break;
case CLOSINGD_SIGEXCHANGE:
@@ -1869,7 +1869,7 @@ static void set_channel_fees(struct command *cmd, struct channel *channel,
/* tell channeld to make a send_channel_update */
if (channel->owner && streq(channel->owner->name, "channeld"))
subd_send_msg(channel->owner,
take(towire_channel_specific_feerates(NULL, base, ppm)));
take(towire_channeld_specific_feerates(NULL, base, ppm)));
/* save values to database */
wallet_channel_save(cmd->ld->wallet, channel);
@@ -2079,7 +2079,7 @@ static struct command_result *json_dev_reenable_commit(struct command *cmd,
"Peer owned by %s", channel->owner->name);
}
msg = towire_channel_dev_reenable_commit(channel);
msg = towire_channeld_dev_reenable_commit(channel);
subd_req(peer, channel->owner, take(msg), -1, 0,
dev_reenable_commit_finished, cmd);
return command_still_pending(cmd);
@@ -2238,7 +2238,7 @@ static void channeld_memleak_req_done(struct subd *channeld,
bool found_leak;
tal_del_destructor2(channeld, subd_died_forget_memleak, cmd);
if (!fromwire_channel_dev_memleak_reply(msg, &found_leak)) {
if (!fromwire_channeld_dev_memleak_reply(msg, &found_leak)) {
was_pending(command_fail(cmd, LIGHTNINGD,
"Bad channel_dev_memleak"));
return;
@@ -2283,7 +2283,7 @@ static void peer_memleak_req_next(struct command *cmd, struct channel *prev)
/* Note: closingd does its own checking automatically */
if (streq(c->owner->name, "channeld")) {
subd_req(c, c->owner,
take(towire_channel_dev_memleak(NULL)),
take(towire_channeld_dev_memleak(NULL)),
-1, 0, channeld_memleak_req_done, cmd);
tal_add_destructor2(c->owner,
subd_died_forget_memleak,

View File

@@ -5,7 +5,7 @@
#include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <channeld/gen_channel_wire.h>
#include <channeld/channeld_wiregen.h>
#include <common/blinding.h>
#include <common/coin_mvt.h>
#include <common/ecdh.h>
@@ -147,7 +147,7 @@ static void tell_channeld_htlc_failed(const struct htlc_in *hin,
return;
subd_send_msg(hin->key.channel->owner,
take(towire_channel_fail_htlc(NULL, failed_htlc)));
take(towire_channeld_fail_htlc(NULL, failed_htlc)));
}
struct failmsg_update_cbdata {
@@ -434,7 +434,7 @@ void fulfill_htlc(struct htlc_in *hin, const struct preimage *preimage)
struct fulfilled_htlc fulfilled_htlc;
fulfilled_htlc.id = hin->key.id;
fulfilled_htlc.payment_preimage = *preimage;
msg = towire_channel_fulfill_htlc(hin, &fulfilled_htlc);
msg = towire_channeld_fulfill_htlc(hin, &fulfilled_htlc);
}
subd_send_msg(channel->owner, take(msg));
}
@@ -543,7 +543,7 @@ static void rcvd_htlc_reply(struct subd *subd, const u8 *msg, const int *fds UNU
char *failurestr;
struct lightningd *ld = subd->ld;
if (!fromwire_channel_offer_htlc_reply(msg, msg,
if (!fromwire_channeld_offer_htlc_reply(msg, msg,
&hout->key.id,
&failmsg,
&failurestr)) {
@@ -664,7 +664,7 @@ const u8 *send_htlc_out(const tal_t *ctx,
out, time_from_sec(30),
htlc_offer_timeout,
out);
msg = towire_channel_offer_htlc(out, amount, cltv, payment_hash,
msg = towire_channeld_offer_htlc(out, amount, cltv, payment_hash,
onion_routing_packet, blinding);
subd_req(out->peer->ld, out->owner, take(msg), -1, 0, rcvd_htlc_reply,
*houtp);
@@ -1706,7 +1706,7 @@ void peer_sending_commitsig(struct channel *channel, const u8 *msg)
channel->htlc_timeout = tal_free(channel->htlc_timeout);
if (!fromwire_channel_sending_commitsig(msg, msg,
if (!fromwire_channeld_sending_commitsig(msg, msg,
&commitnum,
&pbase,
&fee_states,
@@ -1769,7 +1769,7 @@ void peer_sending_commitsig(struct channel *channel, const u8 *msg)
/* Tell it we've got it, and to go ahead with commitment_signed. */
subd_send_msg(channel->owner,
take(towire_channel_sending_commitsig_reply(msg)));
take(towire_channeld_sending_commitsig_reply(msg)));
}
static bool channel_added_their_htlc(struct channel *channel,
@@ -1899,7 +1899,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
size_t i;
struct lightningd *ld = channel->peer->ld;
if (!fromwire_channel_got_commitsig(msg, msg,
if (!fromwire_channeld_got_commitsig(msg, msg,
&commitnum,
&fee_states,
&commit_sig,
@@ -1911,7 +1911,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
&tx)
|| !fee_states_valid(fee_states, channel->opener)) {
channel_internal_error(channel,
"bad fromwire_channel_got_commitsig %s",
"bad fromwire_channeld_got_commitsig %s",
tal_hex(channel, msg));
return;
}
@@ -1990,7 +1990,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
channel->last_htlc_sigs);
/* Tell it we've committed, and to go ahead with revoke. */
msg = towire_channel_got_commitsig_reply(msg);
msg = towire_channeld_got_commitsig_reply(msg);
subd_send_msg(channel->owner, take(msg));
}
@@ -2053,7 +2053,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
struct commitment_revocation_payload *payload;
struct bitcoin_tx *penalty_tx;
if (!fromwire_channel_got_revoke(msg, msg,
if (!fromwire_channeld_got_revoke(msg, msg,
&revokenum, &per_commitment_secret,
&next_per_commitment_point,
&fee_states,
@@ -2061,7 +2061,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
&pbase,
&penalty_tx)
|| !fee_states_valid(fee_states, channel->opener)) {
channel_internal_error(channel, "bad fromwire_channel_got_revoke %s",
channel_internal_error(channel, "bad fromwire_channeld_got_revoke %s",
tal_hex(channel, msg));
return;
}
@@ -2126,7 +2126,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
update_per_commit_point(channel, &next_per_commitment_point);
/* Tell it we've committed, and to go ahead with revoke. */
msg = towire_channel_got_revoke_reply(msg);
msg = towire_channeld_got_revoke_reply(msg);
subd_send_msg(channel->owner, take(msg));
/* Now, any HTLCs we need to immediately fail? */

View File

@@ -1,4 +1,4 @@
#include <channeld/gen_channel_wire.h>
#include <channeld/channeld_wiregen.h>
#include <common/json_command.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>

View File

@@ -106,13 +106,13 @@ void fixup_htlcs_out(struct lightningd *ld UNNEEDED)
/* Generated stub for fromwire_bigsize */
bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
/* Generated stub for fromwire_channel_dev_memleak_reply */
bool fromwire_channel_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_channel_dev_memleak_reply called!\n"); abort(); }
/* Generated stub for fromwire_channel_id */
void fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
struct channel_id *channel_id UNNEEDED)
{ fprintf(stderr, "fromwire_channel_id called!\n"); abort(); }
/* 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(); }
/* Generated stub for fromwire_connect_peer_connected */
bool fromwire_connect_peer_connected(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct node_id *id UNNEEDED, struct wireaddr_internal *addr UNNEEDED, struct per_peer_state **pps UNNEEDED, u8 **features UNNEEDED)
{ fprintf(stderr, "fromwire_connect_peer_connected called!\n"); abort(); }
@@ -461,21 +461,21 @@ void subd_send_msg(struct subd *sd UNNEEDED, const u8 *msg_out UNNEEDED)
/* Generated stub for towire_bigsize */
void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED)
{ fprintf(stderr, "towire_bigsize called!\n"); abort(); }
/* Generated stub for towire_channel_dev_memleak */
u8 *towire_channel_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_channel_dev_reenable_commit */
u8 *towire_channel_dev_reenable_commit(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channel_dev_reenable_commit called!\n"); abort(); }
/* 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(); }
/* Generated stub for towire_channel_send_shutdown */
u8 *towire_channel_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED)
{ fprintf(stderr, "towire_channel_send_shutdown called!\n"); abort(); }
/* Generated stub for towire_channel_specific_feerates */
u8 *towire_channel_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED)
{ fprintf(stderr, "towire_channel_specific_feerates called!\n"); abort(); }
/* 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(); }
/* Generated stub for towire_channeld_send_shutdown */
u8 *towire_channeld_send_shutdown(const tal_t *ctx UNNEEDED, const u8 *shutdown_scriptpubkey UNNEEDED)
{ fprintf(stderr, "towire_channeld_send_shutdown called!\n"); abort(); }
/* Generated stub for towire_channeld_specific_feerates */
u8 *towire_channeld_specific_feerates(const tal_t *ctx UNNEEDED, u32 feerate_base UNNEEDED, u32 feerate_ppm UNNEEDED)
{ fprintf(stderr, "towire_channeld_specific_feerates called!\n"); abort(); }
/* Generated stub for towire_connectctl_connect_to_peer */
u8 *towire_connectctl_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED, u32 seconds_waited UNNEEDED, const struct wireaddr_internal *addrhint UNNEEDED)
{ fprintf(stderr, "towire_connectctl_connect_to_peer called!\n"); abort(); }

View File

@@ -29,12 +29,6 @@ void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct n
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_to_address_scriptpubkey */
enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx UNNEEDED,
const struct chainparams *chainparams UNNEEDED,
const char *buffer UNNEEDED,
const jsmntok_t *tok UNNEEDED, const u8 **scriptpubkey UNNEEDED)
{ fprintf(stderr, "json_to_address_scriptpubkey called!\n"); abort(); }
/* Generated stub for json_to_pubkey */
bool json_to_pubkey(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
struct pubkey *pubkey UNNEEDED)