common/channel_type: wrapper for generated 'struct channel_type'.

We make it a first-class citizen internally, even though we won't use
it over the wire (at least, non-experimental builds).  This scheme
follows the latest draft, in which features are flagged compulsory.

We also add several helper functions.

Since uses the *even* bits (as per latest spec), not the *odd* bits,
we have some other fixups.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-09-09 12:20:52 +09:30 committed by Christian Decker
parent 1b8551923d
commit cb22015b2a
74 changed files with 404 additions and 122 deletions

View file

@ -38,6 +38,7 @@ CHANNELD_COMMON_OBJS := \
common/blockheight_states.o \
common/channel_config.o \
common/channel_id.o \
common/channel_type.o \
common/crypto_state.o \
common/crypto_sync.o \
common/cryptomsg.o \

View file

@ -33,11 +33,11 @@
#include <common/billboard.h>
#include <common/blinding.h>
#include <common/bolt12.h>
#include <common/channel_type.h>
#include <common/coin_mvt.h>
#include <common/crypto_sync.h>
#include <common/dev_disconnect.h>
#include <common/ecdh_hsmd.h>
#include <common/features.h>
#include <common/gossip_constants.h>
#include <common/gossip_store.h>
#include <common/htlc_tx.h>
@ -360,12 +360,6 @@ static bool handle_master_request_later(struct peer *peer, const u8 *msg)
return false;
}
static bool channel_type_eq(const struct channel_type *a,
const struct channel_type *b)
{
return featurebits_eq(a->features, b->features);
}
static bool match_type(const struct channel_type *desired,
const struct channel_type *current,
struct channel_type **upgradable)
@ -377,18 +371,13 @@ static bool match_type(const struct channel_type *desired,
if (channel_type_eq(desired, current))
return true;
for (size_t i = 0; i < tal_count(upgradable); i++) {
if (channel_type_eq(desired, upgradable[i]))
return true;
}
return false;
return channel_type_eq_any(desired, upgradable);
}
static void set_channel_type(struct channel *channel,
const struct channel_type *type)
{
const struct channel_type *cur = channel_type(tmpctx, channel);
const struct channel_type *cur = current_channel_type(tmpctx, channel);
if (channel_type_eq(cur, type))
return;
@ -2744,7 +2733,8 @@ static void peer_reconnect(struct peer *peer,
* to.
* - MAY not set `upgradable` if it would be empty.
*/
send_tlvs->current_type = channel_type(send_tlvs, peer->channel);
send_tlvs->current_type
= current_channel_type(send_tlvs, peer->channel);
send_tlvs->upgradable = channel_upgradable_types(send_tlvs,
peer->channel);
}

View file

@ -1181,4 +1181,4 @@ bool fromwire_channeld_blockheight(const void *p, u32 *blockheight)
*blockheight = fromwire_u32(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:6f638b484f282fdb7bd20ddaedc18092bb1f76a16d843179fb1558d569b687ab
// SHA256STAMP:61caa30da7bcc0a39b2b13a94d5c24a386a6b7a6f4c0800cb37e46e423824f61

View file

@ -240,4 +240,4 @@ bool fromwire_channeld_blockheight(const void *p, u32 *blockheight);
#endif /* LIGHTNING_CHANNELD_CHANNELD_WIREGEN_H */
// SHA256STAMP:6f638b484f282fdb7bd20ddaedc18092bb1f76a16d843179fb1558d569b687ab
// SHA256STAMP:61caa30da7bcc0a39b2b13a94d5c24a386a6b7a6f4c0800cb37e46e423824f61

View file

@ -9,6 +9,7 @@ ALL_TEST_PROGRAMS += $(CHANNELD_TEST_PROGRAMS)
CHANNELD_TEST_COMMON_OBJS := \
common/amount.o \
common/channel_type.o \
common/daemon_conn.o \
common/htlc_state.o \
common/htlc_trim.o \

View file

@ -1,5 +1,6 @@
#include <inttypes.h>
#include <stdio.h>
#include <common/channel_type.h>
#include <common/type_to_string.h>
static bool print_superverbose;
#define SUPERVERBOSE(...) \
@ -22,6 +23,19 @@ static bool print_superverbose;
/*#define DEBUG */
/* AUTOGENERATED MOCKS START */
/* 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(); }
/* 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(); }
/* Generated stub for feature_offered */
bool feature_offered(const u8 *features UNNEEDED, size_t f UNNEEDED)
{ fprintf(stderr, "feature_offered called!\n"); abort(); }
/* Generated stub for featurebits_eq */
bool featurebits_eq(const u8 *f1 UNNEEDED, const u8 *f2 UNNEEDED)
{ fprintf(stderr, "featurebits_eq called!\n"); abort(); }
/* Generated stub for fromwire_bigsize */
bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
@ -32,6 +46,9 @@ void fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
/* 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(); }
/* Generated stub for set_feature_bit */
void set_feature_bit(u8 **ptr UNNEEDED, u32 bit UNNEEDED)
{ fprintf(stderr, "set_feature_bit called!\n"); abort(); }
/* Generated stub for status_fmt */
void status_fmt(enum log_level level UNNEEDED,
const struct node_id *peer UNNEEDED,

View file

@ -18,6 +18,19 @@
#include <wally_core.h>
/* AUTOGENERATED MOCKS START */
/* 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(); }
/* 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(); }
/* Generated stub for feature_offered */
bool feature_offered(const u8 *features UNNEEDED, size_t f UNNEEDED)
{ fprintf(stderr, "feature_offered called!\n"); abort(); }
/* Generated stub for featurebits_eq */
bool featurebits_eq(const u8 *f1 UNNEEDED, const u8 *f2 UNNEEDED)
{ fprintf(stderr, "featurebits_eq called!\n"); abort(); }
/* Generated stub for fromwire_bigsize */
bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }

View file

@ -209,4 +209,4 @@ bool fromwire_closingd_complete(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:2de9bc103000dc6f1f821186efd51ed571b8515f6c6bd10df5067405d45cf151
// SHA256STAMP:bda282f9c8cf3c0fc1274165b9adeb691f0447fd9c27cb4bbe0717e809df4a95

View file

@ -56,4 +56,4 @@ bool fromwire_closingd_complete(const void *p);
#endif /* LIGHTNING_CLOSINGD_CLOSINGD_WIREGEN_H */
// SHA256STAMP:2de9bc103000dc6f1f821186efd51ed571b8515f6c6bd10df5067405d45cf151
// SHA256STAMP:bda282f9c8cf3c0fc1274165b9adeb691f0447fd9c27cb4bbe0717e809df4a95

View file

@ -17,6 +17,7 @@ COMMON_SRC_NOGEN := \
common/bolt12_merkle.c \
common/channel_config.c \
common/channel_id.c \
common/channel_type.c \
common/coin_mvt.c \
common/close_tx.c \
common/configdir.c \

143
common/channel_type.c Normal file
View file

@ -0,0 +1,143 @@
#include <ccan/array_size/array_size.h>
#include <common/channel_type.h>
/* BOLT-channel-types #2:
* Channel types are an explicit enumeration: for convenience of future
* definitions they reuse even feature bits, but they are not an
* arbitrary combination (they represent the persistent features which
* affect the channel operation).
*
* The currently defined types are:
* - no features (no bits set)
* - `option_static_remotekey` (bit 12)
* - `option_anchor_outputs` and `option_static_remotekey` (bits 20 and 12)
* - `option_anchors_zero_fee_htlc_tx` and `option_static_remotekey` (bits 22
* and 12)
*/
struct channel_type *channel_type_none(const tal_t *ctx)
{
struct channel_type *type = tal(ctx, struct channel_type);
type->features = tal_arr(type, u8, 0);
return type;
}
struct channel_type *channel_type_static_remotekey(const tal_t *ctx)
{
struct channel_type *type = channel_type_none(ctx);
set_feature_bit(&type->features,
COMPULSORY_FEATURE(OPT_STATIC_REMOTEKEY));
return type;
}
struct channel_type *channel_type_anchor_outputs(const tal_t *ctx)
{
struct channel_type *type = channel_type_none(ctx);
set_feature_bit(&type->features,
COMPULSORY_FEATURE(OPT_ANCHOR_OUTPUTS));
set_feature_bit(&type->features,
COMPULSORY_FEATURE(OPT_STATIC_REMOTEKEY));
return type;
}
struct channel_type *default_channel_type(const tal_t *ctx,
const struct feature_set *our_features,
const u8 *their_features)
{
/* BOLT-channel-types #2:
* Both peers:
* - if `channel_type` was present in both `open_channel` and `accept_channel`:
* - This is the `channel_type` (they must be equal, required above)
* - otherwise:
*/
/* BOLT-channel-types #2:
* - otherwise, if `option_anchor_outputs` was negotiated:
* - the `channel_type` is `option_anchor_outputs` and
* `option_static_remotekey` (bits 20 and 12)
*/
if (feature_negotiated(our_features, their_features,
OPT_ANCHOR_OUTPUTS))
return channel_type_anchor_outputs(ctx);
/* BOLT-channel-types #2:
* - otherwise, if `option_static_remotekey` was negotiated:
* - the `channel_type` is `option_static_remotekey` (bit 12)
*/
else if (feature_negotiated(our_features, their_features,
OPT_STATIC_REMOTEKEY))
return channel_type_static_remotekey(ctx);
/* BOLT-channel-types #2:
* - otherwise:
* - the `channel_type` is empty
*/
else
return channel_type_none(ctx);
}
bool channel_type_has(const struct channel_type *type, int feature)
{
return feature_offered(type->features, feature);
}
bool channel_type_eq(const struct channel_type *a,
const struct channel_type *b)
{
return featurebits_eq(a->features, b->features);
}
bool channel_type_eq_any(const struct channel_type *t,
struct channel_type **arr)
{
for (size_t i = 0; i < tal_count(arr); i++) {
if (channel_type_eq(t, arr[i]))
return true;
}
return false;
}
struct channel_type *channel_type_dup(const tal_t *ctx,
const struct channel_type *t)
{
struct channel_type *ret = tal(ctx, struct channel_type);
ret->features = tal_dup_talarr(ret, u8, t->features);
return ret;
}
struct channel_type *channel_type_accept(const tal_t *ctx,
const u8 *t,
const struct feature_set *our_features,
const u8 *their_features)
{
struct channel_type *ctype;
static const size_t feats[] = { OPT_ANCHOR_OUTPUTS,
OPT_STATIC_REMOTEKEY };
for (size_t i = 0; i < ARRAY_SIZE(feats); i++) {
size_t f = feats[i];
if (feature_offered(t, f)) {
/* If we don't offer a feature, we don't allow it. */
if (!feature_offered(our_features->bits[INIT_FEATURE], f))
return NULL;
} else {
/* We assume that if we *require* a feature, we require
* channels have that. */
if (feature_is_set(our_features->bits[INIT_FEATURE],
COMPULSORY_FEATURE(f)))
return NULL;
}
}
/* Otherwise, just needs to be a known channel type. */
ctype = channel_type_none(tmpctx);
if (featurebits_eq(t, ctype->features))
return tal_steal(ctx, ctype);
ctype = channel_type_static_remotekey(tmpctx);
if (featurebits_eq(t, ctype->features))
return tal_steal(ctx, ctype);
ctype = channel_type_anchor_outputs(tmpctx);
if (featurebits_eq(t, ctype->features))
return tal_steal(ctx, ctype);
return NULL;
}

38
common/channel_type.h Normal file
View file

@ -0,0 +1,38 @@
/* This represents a channel type: i.e. the sticky feature bits. */
#ifndef LIGHTNING_COMMON_CHANNEL_TYPE_H
#define LIGHTNING_COMMON_CHANNEL_TYPE_H
#include "config.h"
#include <common/features.h>
#include <wire/channel_type_wiregen.h>
/* Explicit channel types */
struct channel_type *channel_type_none(const tal_t *ctx);
struct channel_type *channel_type_static_remotekey(const tal_t *ctx);
struct channel_type *channel_type_anchor_outputs(const tal_t *ctx);
/* Duplicate a channel_type */
struct channel_type *channel_type_dup(const tal_t *ctx,
const struct channel_type *t);
/* Derive channel type from feature negotiation */
struct channel_type *default_channel_type(const tal_t *ctx,
const struct feature_set *our_features,
const u8 *their_features);
/* Does this type include this feature? */
bool channel_type_has(const struct channel_type *type, int feature);
/* Are these two channel_types equivalent? */
bool channel_type_eq(const struct channel_type *a,
const struct channel_type *b);
/* Is channel_type_eq() for any type in this array? */
bool channel_type_eq_any(const struct channel_type *t,
struct channel_type **arr);
/* Return channel_type if this is acceptable, otherwise NULL */
struct channel_type *channel_type_accept(const tal_t *ctx,
const u8 *t,
const struct feature_set *our_features,
const u8 *their_features);
#endif /* LIGHTNING_COMMON_CHANNEL_TYPE_H */

View file

@ -7,7 +7,7 @@
#include <ccan/cast/cast.h>
#include <ccan/tal/str/str.h>
#include <common/blockheight_states.h>
#include <common/features.h>
#include <common/channel_type.h>
#include <common/fee_states.h>
#include <common/initial_channel.h>
#include <common/initial_commit_tx.h>
@ -169,53 +169,15 @@ u32 channel_blockheight(const struct channel *channel, enum side side)
channel->opener, side);
}
#if EXPERIMENTAL_FEATURES
/* BOLT-upgrade_protocol #2:
* Channel features are explicitly enumerated as `channel_type` bitfields,
* using odd features bits. The currently defined types are:
* - no features (no bits set)
* - `option_static_remotekey` (bit 13)
* - `option_anchor_outputs` and `option_static_remotekey` (bits 21 and 13)
* - `option_anchors_zero_fee_htlc_tx` and `option_static_remotekey` (bits 23
* and 13)
*/
static struct channel_type *new_channel_type(const tal_t *ctx)
struct channel_type *current_channel_type(const tal_t *ctx,
const struct channel *channel)
{
struct channel_type *type = tal(ctx, struct channel_type);
if (channel->option_anchor_outputs)
return channel_type_anchor_outputs(ctx);
if (channel->option_static_remotekey)
return channel_type_static_remotekey(ctx);
type->features = tal_arr(type, u8, 0);
return type;
}
static struct channel_type *type_static_remotekey(const tal_t *ctx)
{
struct channel_type *type = new_channel_type(ctx);
set_feature_bit(&type->features,
OPTIONAL_FEATURE(OPT_STATIC_REMOTEKEY));
return type;
}
static struct channel_type *type_anchor_outputs(const tal_t *ctx)
{
struct channel_type *type = new_channel_type(ctx);
set_feature_bit(&type->features,
OPTIONAL_FEATURE(OPT_ANCHOR_OUTPUTS));
set_feature_bit(&type->features,
OPTIONAL_FEATURE(OPT_STATIC_REMOTEKEY));
return type;
}
struct channel_type *channel_type(const tal_t *ctx,
const struct channel *channel)
{
if (channel->option_anchor_outputs)
return type_anchor_outputs(ctx);
if (channel->option_static_remotekey)
return type_static_remotekey(ctx);
return new_channel_type(ctx);
return channel_type_none(ctx);
}
struct channel_type **channel_upgradable_types(const tal_t *ctx,
@ -224,7 +186,7 @@ struct channel_type **channel_upgradable_types(const tal_t *ctx,
struct channel_type **arr = tal_arr(ctx, struct channel_type *, 0);
if (!channel->option_static_remotekey)
tal_arr_expand(&arr, type_static_remotekey(arr));
tal_arr_expand(&arr, channel_type_static_remotekey(arr));
return arr;
}
@ -234,12 +196,11 @@ struct channel_type *channel_desired_type(const tal_t *ctx,
{
/* We don't actually want to downgrade anchors! */
if (channel->option_anchor_outputs)
return type_anchor_outputs(ctx);
return channel_type_anchor_outputs(ctx);
/* For now, we just want option_static_remotekey */
return type_static_remotekey(ctx);
return channel_type_static_remotekey(ctx);
}
#endif /* EXPERIMENTAL_FEATURES */
static char *fmt_channel_view(const tal_t *ctx, const struct channel_view *view)
{

View file

@ -163,13 +163,12 @@ u32 channel_feerate(const struct channel *channel, enum side side);
*/
u32 channel_blockheight(const struct channel *channel, enum side side);
#if EXPERIMENTAL_FEATURES
/* BOLT-upgrade_protocol #2:
* Channel features are explicitly enumerated as `channel_type` bitfields,
* using odd features bits.
*/
struct channel_type *channel_type(const tal_t *ctx,
const struct channel *channel);
struct channel_type *current_channel_type(const tal_t *ctx,
const struct channel *channel);
/* What features can we upgrade? (Returns NULL if none). */
struct channel_type **channel_upgradable_types(const tal_t *ctx,
@ -178,6 +177,5 @@ struct channel_type **channel_upgradable_types(const tal_t *ctx,
/* What features do we want? */
struct channel_type *channel_desired_type(const tal_t *ctx,
const struct channel *channel);
#endif /* EXPERIMENTAL_FEATURES */
#endif /* LIGHTNING_COMMON_INITIAL_CHANNEL_H */

View file

@ -80,4 +80,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
fromwire_u8_array(&cursor, &plen, *error_for_them, len);
return cursor != NULL;
}
// SHA256STAMP:53c75737dd0b8df4245093d3236d2d494451f01872e30b2ad76853766f22c60e
// SHA256STAMP:b3244d3c5f959de2b906e7afc98c3278282ab06eab89c7572c424b36b994c484

View file

@ -34,4 +34,4 @@ bool fromwire_status_peer_error(const tal_t *ctx, const void *p, struct channel_
#endif /* LIGHTNING_COMMON_PEER_STATUS_WIREGEN_H */
// SHA256STAMP:53c75737dd0b8df4245093d3236d2d494451f01872e30b2ad76853766f22c60e
// SHA256STAMP:b3244d3c5f959de2b906e7afc98c3278282ab06eab89c7572c424b36b994c484

View file

@ -214,4 +214,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
*version = fromwire_wirestring(ctx, &cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:efb87b0bb9ae86931d808d17b03d3e7a9b4c4f2577f152f04fbe4531a6b8196a
// SHA256STAMP:9ccc7c9a9c09390733ffde17bcee096fef4b4edbf469a5037574fe8eefe6f946

View file

@ -58,4 +58,4 @@ bool fromwire_status_version(const tal_t *ctx, const void *p, wirestring **versi
#endif /* LIGHTNING_COMMON_STATUS_WIREGEN_H */
// SHA256STAMP:efb87b0bb9ae86931d808d17b03d3e7a9b4c4f2577f152f04fbe4531a6b8196a
// SHA256STAMP:9ccc7c9a9c09390733ffde17bcee096fef4b4edbf469a5037574fe8eefe6f946

View file

@ -18,6 +18,7 @@
#include <ccan/tal/path/path.h>
#include <common/bolt12.h>
#include <common/setup.h>
#include <wire/channel_type_wiregen.h>
#include <wire/peer_wire.h>
/* AUTOGENERATED MOCKS START */
@ -25,6 +26,9 @@
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* 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(); }
@ -50,6 +54,9 @@ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
/* 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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* 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(); }

View file

@ -10,6 +10,7 @@
#include <common/features.h>
#include <common/setup.h>
#include <stdarg.h>
#include <wire/channel_type_wiregen.h>
/* Definition of n1 from the spec */
#include <wire/peer_wire.h>
@ -24,12 +25,18 @@ int features_unsupported(const struct feature_set *our_features UNNEEDED,
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_onionmsg_path */
struct onionmsg_path *fromwire_onionmsg_path(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_onionmsg_path 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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_onionmsg_path */
void towire_onionmsg_path(u8 **p UNNEEDED, const struct onionmsg_path *onionmsg_path UNNEEDED)
{ fprintf(stderr, "towire_onionmsg_path called!\n"); abort(); }

View file

@ -7,6 +7,7 @@
#include <bitcoin/privkey.h>
#include <ccan/read_write_all/read_write_all.h>
#include <common/amount.h>
#include <common/channel_type.h>
#include <common/setup.h>
#include <stdio.h>
#include <wire/tlvstream.h>
@ -19,12 +20,18 @@ bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* 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_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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for type_to_string_ */
const char *type_to_string_(const tal_t *ctx UNNEEDED, const char *typename UNNEEDED,
union printable_types u UNNEEDED)

View file

@ -7,9 +7,13 @@
#include <common/utils.h>
#include <inttypes.h>
#include <stdio.h>
#include <wire/channel_type_wiregen.h>
#include <wire/wire.h>
/* AUTOGENERATED MOCKS START */
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_tlv */
bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,
@ -19,6 +23,9 @@ bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
bool tlv_fields_valid(const struct tlv_field *fields UNNEEDED, u64 *allow_extra UNNEEDED,
size_t *err_index UNNEEDED)
{ fprintf(stderr, "tlv_fields_valid called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_tlv */
void towire_tlv(u8 **pptr UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,

View file

@ -10,6 +10,7 @@
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <wire/channel_type_wiregen.h>
#include <wire/wire.h>
char *fail_msg = NULL;
@ -40,6 +41,9 @@ struct command_result *command_fail(struct command *cmd,
}
/* AUTOGENERATED MOCKS START */
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_tlv */
bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,
@ -86,6 +90,9 @@ int segwit_addr_decode(
bool tlv_fields_valid(const struct tlv_field *fields UNNEEDED, u64 *allow_extra UNNEEDED,
size_t *err_index UNNEEDED)
{ fprintf(stderr, "tlv_fields_valid called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_tlv */
void towire_tlv(u8 **pptr UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,

View file

@ -6,6 +6,7 @@
* {'channels': [{'active': True, 'short_id': '6990x2x1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'last_update': 1504064344}, {'active': True, 'short_id': '6989x2x1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 0, 'destination': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, {'active': True, 'short_id': '6990x2x1/0', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 0, 'destination': '02ea622d5c8d6143f15ed3ce1d501dd0d3d09d3b1c83a44d0034949f8a9ab60f06', 'source': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'last_update': 1504064344}, {'active': True, 'short_id': '6989x2x1/1', 'fee_per_kw': 10, 'delay': 5, 'message_flags': 0, 'channel_flags': 1, 'destination': '0230ad0e74ea03976b28fda587bb75bdd357a1938af4424156a18265167f5e40ae', 'source': '03c173897878996287a8100469f954dd820fcd8941daed91c327f168f3329be0bf', 'last_update': 1504064344}]}
*/
#include <assert.h>
#include <common/channel_type.h>
#include <common/dijkstra.h>
#include <common/gossmap.h>
#include <common/gossip_store.h>
@ -24,6 +25,9 @@ bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_tlv */
bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,
@ -39,6 +43,9 @@ void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED)
/* 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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_tlv */
void towire_tlv(u8 **pptr UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,

View file

@ -1,4 +1,5 @@
#include <assert.h>
#include <common/channel_type.h>
#include <common/dijkstra.h>
#include <common/gossmap.h>
#include <common/gossip_store.h>
@ -17,6 +18,9 @@ bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_tlv */
bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,
@ -32,6 +36,9 @@ void towire_bigsize(u8 **pptr UNNEEDED, const bigsize_t val UNNEEDED)
/* 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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_tlv */
void towire_tlv(u8 **pptr UNNEEDED,
const struct tlv_record_type *types UNNEEDED, size_t num_types UNNEEDED,

View file

@ -161,4 +161,4 @@ bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wi
fromwire_wireaddr(&cursor, &plen, *addrs + i);
return cursor != NULL;
}
// SHA256STAMP:1b54c6c417d2023c3c8816a56a79a80ce84305454caa42c4f3fa0d8e6bc511a7
// SHA256STAMP:6dce0976ccde7d8461a17a5b87e00a6f6cd0256d26d29843ff15d7be82161316

View file

@ -54,4 +54,4 @@ bool fromwire_gossipd_get_addrs_reply(const tal_t *ctx, const void *p, struct wi
#endif /* LIGHTNING_CONNECTD_CONNECTD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:1b54c6c417d2023c3c8816a56a79a80ce84305454caa42c4f3fa0d8e6bc511a7
// SHA256STAMP:6dce0976ccde7d8461a17a5b87e00a6f6cd0256d26d29843ff15d7be82161316

View file

@ -443,4 +443,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:477fff39e2b2b97fd4da86933f7cedd6f38097634ae4123ede66594907c414e3
// SHA256STAMP:89a554e6550ee7c67c1526475e03fa2862335159ec5ff3e7c511da5c040e71a7

View file

@ -110,4 +110,4 @@ bool fromwire_connectd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_CONNECTD_CONNECTD_WIREGEN_H */
// SHA256STAMP:477fff39e2b2b97fd4da86933f7cedd6f38097634ae4123ede66594907c414e3
// SHA256STAMP:89a554e6550ee7c67c1526475e03fa2862335159ec5ff3e7c511da5c040e71a7

View file

@ -43,6 +43,7 @@ DEVTOOLS_COMMON_OBJS := \
common/wireaddr.o \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o \
wire/channel_type_wiregen.o \
wire/tlvstream.o
devtools/bolt11-cli: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bolt11-cli.o
@ -70,7 +71,7 @@ devtools/gossipwith: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) $(BITCOIN
$(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h
devtools/mkcommit: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) common/derive_basepoints.o common/keyset.o common/key_derive.o common/initial_commit_tx.o common/permute_tx.o wire/fromwire.o wire/towire.o devtools/mkcommit.o channeld/full_channel.o common/initial_channel.o common/htlc_state.o common/pseudorand.o common/htlc_tx.o channeld/commit_tx.o common/htlc_trim.o
devtools/mkcommit: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) common/derive_basepoints.o common/channel_type.o common/keyset.o common/key_derive.o common/initial_commit_tx.o common/permute_tx.o wire/fromwire.o wire/towire.o devtools/mkcommit.o channeld/full_channel.o common/initial_channel.o common/htlc_state.o common/pseudorand.o common/htlc_tx.o channeld/commit_tx.o common/htlc_trim.o
devtools/mkfunding: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/key_derive.o devtools/mkfunding.o

View file

@ -20,6 +20,7 @@
#include <common/amount.h>
#include <common/blockheight_states.h>
#include <common/channel_id.h>
#include <common/channel_type.h>
#include <common/derive_basepoints.h>
#include <common/fee_states.h>
#include <common/htlc_wire.h>

View file

@ -210,4 +210,4 @@ bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, str
fromwire_u8_array(&cursor, &plen, *features, flen);
return cursor != NULL;
}
// SHA256STAMP:349d7e48ef1b41ce203a634053cbd5c9f290443e408bfa53aa7e67aaa28969d9
// SHA256STAMP:795023c4916bb16e65d205888cbafe856143146585086230087a7c96350cafb8

View file

@ -63,4 +63,4 @@ bool fromwire_gossipd_local_add_channel_obs(const tal_t *ctx, const void *p, str
#endif /* LIGHTNING_GOSSIPD_GOSSIP_STORE_WIREGEN_H */
// SHA256STAMP:349d7e48ef1b41ce203a634053cbd5c9f290443e408bfa53aa7e67aaa28969d9
// SHA256STAMP:795023c4916bb16e65d205888cbafe856143146585086230087a7c96350cafb8

View file

@ -161,4 +161,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
fromwire_u8_array(&cursor, &plen, *cannount, len);
return cursor != NULL;
}
// SHA256STAMP:600189f0a17aa520601e8df4723cb0b90a9d3fe1f7a5aa59b1b7d7e23aa6c252
// SHA256STAMP:f3c8b8c99b8a6d1e0337375ea2e252024b99bc8e88d86a91387f0886b7cfffff

View file

@ -57,4 +57,4 @@ bool fromwire_gossipd_local_channel_announcement(const tal_t *ctx, const void *p
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_PEERD_WIREGEN_H */
// SHA256STAMP:600189f0a17aa520601e8df4723cb0b90a9d3fe1f7a5aa59b1b7d7e23aa6c252
// SHA256STAMP:f3c8b8c99b8a6d1e0337375ea2e252024b99bc8e88d86a91387f0886b7cfffff

View file

@ -777,4 +777,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates)
fromwire_lease_rates(&cursor, &plen, rates);
return cursor != NULL;
}
// SHA256STAMP:3f85ead064706c1a9cf60622838cf886ec92eb91c18360ac1aee7faeadd1a3cd
// SHA256STAMP:14767c196ce9ab6b891ea20a5f620a5fcb94f67ffc23d757a04222cc8012e1af

View file

@ -188,4 +188,4 @@ bool fromwire_gossipd_new_lease_rates(const void *p, struct lease_rates *rates);
#endif /* LIGHTNING_GOSSIPD_GOSSIPD_WIREGEN_H */
// SHA256STAMP:3f85ead064706c1a9cf60622838cf886ec92eb91c18360ac1aee7faeadd1a3cd
// SHA256STAMP:14767c196ce9ab6b891ea20a5f620a5fcb94f67ffc23d757a04222cc8012e1af

View file

@ -29,6 +29,7 @@ In particular, we set feature bit 19. The spec says we should set feature bit 1
#include "../common/wire_error.c"
#include "../routing.c"
#include <common/channel_type.h>
#include <common/json_stream.h>
#include <common/setup.h>
#include <stdio.h>
@ -42,6 +43,9 @@ bool cupdate_different(struct gossip_store *gs UNNEEDED,
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_wireaddr_array */
struct wireaddr *fromwire_wireaddr_array(const tal_t *ctx UNNEEDED, const u8 *ser UNNEEDED)
{ fprintf(stderr, "fromwire_wireaddr_array called!\n"); abort(); }
@ -124,6 +128,9 @@ void status_fmt(enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])

View file

@ -2,6 +2,7 @@
#include <common/json_stream.h>
#include <common/setup.h>
#include <stdio.h>
#include <wire/channel_type_wiregen.h>
/* AUTOGENERATED MOCKS START */
/* Generated stub for find_peer */
@ -10,6 +11,9 @@ struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_local_channel_update */
bool fromwire_gossipd_local_channel_update(const void *p UNNEEDED, struct short_channel_id *short_channel_id UNNEEDED, bool *disable UNNEEDED, u16 *cltv_expiry_delta UNNEEDED, struct amount_msat *htlc_minimum_msat UNNEEDED, u32 *fee_base_msat UNNEEDED, u32 *fee_proportional_millionths UNNEEDED, struct amount_msat *htlc_maximum_msat UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_local_channel_update called!\n"); abort(); }
@ -74,6 +78,9 @@ void status_fmt(enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_hsmd_cupdate_sig_req */
u8 *towire_hsmd_cupdate_sig_req(const tal_t *ctx UNNEEDED, const u8 *cu UNNEEDED)
{ fprintf(stderr, "towire_hsmd_cupdate_sig_req called!\n"); abort(); }

View file

@ -3,6 +3,7 @@ int unused_main(int argc, char *argv[]);
#include "../queries.c"
#include "../gossip_generation.c"
#undef main
#include <common/channel_type.h>
#include <common/json_stream.h>
#include <stdio.h>
@ -31,6 +32,9 @@ struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_dev_set_max_scids_encode_size */
bool fromwire_gossipd_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_dev_set_max_scids_encode_size called!\n"); abort(); }
@ -113,6 +117,9 @@ void status_fmt(enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_hsmd_cupdate_sig_req */
u8 *towire_hsmd_cupdate_sig_req(const tal_t *ctx UNNEEDED, const u8 *cu UNNEEDED)
{ fprintf(stderr, "towire_hsmd_cupdate_sig_req called!\n"); abort(); }

View file

@ -4,6 +4,7 @@
#include "../queries.c"
#include <ccan/str/hex/hex.h>
#include <common/channel_type.h>
#include <common/json.h>
#include <common/json_helpers.h>
#include <common/json_stream.h>
@ -36,6 +37,9 @@ struct short_channel_id *decode_short_ids(const tal_t *ctx UNNEEDED, const u8 *e
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_gossipd_dev_set_max_scids_encode_size */
bool fromwire_gossipd_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_gossipd_dev_set_max_scids_encode_size called!\n"); abort(); }
@ -82,6 +86,9 @@ void queue_peer_from_store(struct peer *peer UNNEEDED,
/* Generated stub for queue_peer_msg */
void queue_peer_msg(struct peer *peer UNNEEDED, const u8 *msg TAKES UNNEEDED)
{ fprintf(stderr, "queue_peer_msg called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_warningfmt */
u8 *towire_warningfmt(const tal_t *ctx UNNEEDED,
const struct channel_id *channel UNNEEDED,

View file

@ -1,5 +1,6 @@
#include "../seeker.c"
#include <ccan/err/err.h>
#include <common/channel_type.h>
#include <common/json_stream.h>
#include <common/memleak.h>
#include <common/wireaddr.h>
@ -10,6 +11,9 @@
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for json_add_member */
void json_add_member(struct json_stream *js UNNEEDED,
const char *fieldname UNNEEDED,
@ -68,6 +72,9 @@ void status_fmt(enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for would_ratelimit_cupdate */
bool would_ratelimit_cupdate(struct routing_state *rstate UNNEEDED,
const struct half_chan *hc UNNEEDED,

View file

@ -1,5 +1,6 @@
#include "../routing.c"
#include "../common/timeout.c"
#include <common/channel_type.h>
#include <common/json_stream.h>
#include <common/setup.h>
#include <stdio.h>
@ -13,6 +14,9 @@ bool cupdate_different(struct gossip_store *gs UNNEEDED,
/* Generated stub for fmt_wireaddr_without_port */
char *fmt_wireaddr_without_port(const tal_t *ctx UNNEEDED, const struct wireaddr *a UNNEEDED)
{ fprintf(stderr, "fmt_wireaddr_without_port called!\n"); abort(); }
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for fromwire_wireaddr_array */
struct wireaddr *fromwire_wireaddr_array(const tal_t *ctx UNNEEDED, const u8 *ser UNNEEDED)
{ fprintf(stderr, "fromwire_wireaddr_array called!\n"); abort(); }
@ -89,6 +93,9 @@ void status_fmt(enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* Generated stub for towire_warningfmt */
u8 *towire_warningfmt(const tal_t *ctx UNNEEDED,
const struct channel_id *channel UNNEEDED,

2
hsmd/hsmd_wiregen.c generated
View file

@ -1331,4 +1331,4 @@ bool fromwire_hsmd_sign_option_will_fund_offer_reply(const void *p, secp256k1_ec
fromwire_secp256k1_ecdsa_signature(&cursor, &plen, rsig);
return cursor != NULL;
}
// SHA256STAMP:3a1cfc8bae7f0755d3463502a70a24105d57d69b8713a919b384ed2d5dbf0cd3
// SHA256STAMP:5ad9bd055256f1ef74c90f07b1a7afce00922aef9780fb948eecbed409f288a7

2
hsmd/hsmd_wiregen.h generated
View file

@ -295,4 +295,4 @@ bool fromwire_hsmd_sign_option_will_fund_offer_reply(const void *p, secp256k1_ec
#endif /* LIGHTNING_HSMD_HSMD_WIREGEN_H */
// SHA256STAMP:3a1cfc8bae7f0755d3463502a70a24105d57d69b8713a919b384ed2d5dbf0cd3
// SHA256STAMP:5ad9bd055256f1ef74c90f07b1a7afce00922aef9780fb948eecbed409f288a7

View file

@ -639,4 +639,4 @@ bool fromwire_onchaind_notify_coin_mvt(const void *p, struct chain_coin_mvt *mvt
fromwire_chain_coin_mvt(&cursor, &plen, mvt);
return cursor != NULL;
}
// SHA256STAMP:f591fbdc03a41071e5db7a11ee0420f52a1edf1fdd282d32aca0dadca9ef58e9
// SHA256STAMP:20dc7be2811008cab3f7d2ddafb6c8496c9e8fcf91d00cb770c2f4b7f2038ff6

View file

@ -161,4 +161,4 @@ bool fromwire_onchaind_notify_coin_mvt(const void *p, struct chain_coin_mvt *mvt
#endif /* LIGHTNING_ONCHAIND_ONCHAIND_WIREGEN_H */
// SHA256STAMP:f591fbdc03a41071e5db7a11ee0420f52a1edf1fdd282d32aca0dadca9ef58e9
// SHA256STAMP:20dc7be2811008cab3f7d2ddafb6c8496c9e8fcf91d00cb770c2f4b7f2038ff6

View file

@ -39,6 +39,7 @@ OPENINGD_COMMON_OBJS := \
common/blockheight_states.o \
common/channel_config.o \
common/channel_id.o \
common/channel_type.o \
common/crypto_state.o \
common/crypto_sync.o \
common/cryptomsg.o \

View file

@ -27,8 +27,8 @@
#include <common/blockheight_states.h>
#include <common/channel_config.h>
#include <common/channel_id.h>
#include <common/channel_type.h>
#include <common/crypto_sync.h>
#include <common/features.h>
#include <common/fee_states.h>
#include <common/gossip_rcvd_filter.h>
#include <common/gossip_store.h>

View file

@ -1051,4 +1051,4 @@ bool fromwire_dualopend_validate_lease_reply(const tal_t *ctx, const void *p, wi
}
return cursor != NULL;
}
// SHA256STAMP:d3e4c74b3be230886c645147161d1886b771aa740286dd96957c83dc07aaf3ee
// SHA256STAMP:c698a54fc29460937c0acb7747670f756df42d10b6cb2fe1d3676dd9c045eb4b

View file

@ -225,4 +225,4 @@ bool fromwire_dualopend_validate_lease_reply(const tal_t *ctx, const void *p, wi
#endif /* LIGHTNING_OPENINGD_DUALOPEND_WIREGEN_H */
// SHA256STAMP:d3e4c74b3be230886c645147161d1886b771aa740286dd96957c83dc07aaf3ee
// SHA256STAMP:c698a54fc29460937c0acb7747670f756df42d10b6cb2fe1d3676dd9c045eb4b

View file

@ -18,9 +18,9 @@
#include <ccan/fdpass/fdpass.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <common/channel_type.h>
#include <common/crypto_sync.h>
#include <common/derive_basepoints.h>
#include <common/features.h>
#include <common/fee_states.h>
#include <common/gossip_rcvd_filter.h>
#include <common/gossip_store.h>

View file

@ -600,4 +600,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak)
*leak = fromwire_bool(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:f3d812d3286e301c6ef426e582de63b3c140e4e156a64df5ea31e1849ed3902d
// SHA256STAMP:5af57506d50a0146a11775226d2f4a265ab1d689eabda9a2244ae87013330034

View file

@ -128,4 +128,4 @@ bool fromwire_openingd_dev_memleak_reply(const void *p, bool *leak);
#endif /* LIGHTNING_OPENINGD_OPENINGD_WIREGEN_H */
// SHA256STAMP:f3d812d3286e301c6ef426e582de63b3c140e4e156a64df5ea31e1849ed3902d
// SHA256STAMP:5af57506d50a0146a11775226d2f4a265ab1d689eabda9a2244ae87013330034

View file

@ -133,6 +133,7 @@ PLUGIN_COMMON_OBJS := \
common/utils.o \
common/version.o \
common/wireaddr.o \
wire/channel_type_wiregen.o \
wire/fromwire.o \
wire/onion$(EXP)_wiregen.o \
wire/peer$(EXP)_wiregen.o \
@ -146,7 +147,7 @@ plugins/autoclean: bitcoin/chainparams.o $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_O
# Topology wants to decode node_announcement, and peer_wiregen which
# pulls in some of bitcoin/.
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/fp16.o bitcoin/chainparams.o wire/peer$(EXP)_wiregen.o bitcoin/block.o bitcoin/preimage.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
plugins/topology: common/route.o common/dijkstra.o common/gossmap.o common/fp16.o bitcoin/chainparams.o wire/peer$(EXP)_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
plugins/txprepare: bitcoin/chainparams.o $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)

View file

@ -3500,8 +3500,8 @@ def test_upgrade_statickey(node_factory, executor):
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l1.daemon.wait_for_logs([r"They sent current_type \[\]",
r"They offered upgrade to \[13\]"])
l2.daemon.wait_for_log(r"They sent desired_type \[13\]")
r"They offered upgrade to \[12\]"])
l2.daemon.wait_for_log(r"They sent desired_type \[12\]")
l1.daemon.wait_for_log('option_static_remotekey enabled at 1/1')
l2.daemon.wait_for_log('option_static_remotekey enabled at 1/1')
@ -3514,8 +3514,8 @@ def test_upgrade_statickey(node_factory, executor):
# They won't offer upgrade!
assert not l1.daemon.is_in_log("They offered upgrade",
start=l1.daemon.logsearch_start)
l1.daemon.wait_for_log(r"They sent current_type \[13\]")
l2.daemon.wait_for_log(r"They sent desired_type \[13\]")
l1.daemon.wait_for_log(r"They sent current_type \[12\]")
l2.daemon.wait_for_log(r"They sent desired_type \[12\]")
@unittest.skipIf(not EXPERIMENTAL_FEATURES, "upgrade protocol not available")

View file

@ -239,6 +239,7 @@ class Type(FieldSet):
'tx_parts',
'wally_psbt',
'wally_tx',
'channel_type',
]
# Some BOLT types are re-typed based on their field name

View file

@ -11,6 +11,7 @@ WIRE_HEADERS := wire/onion_defs.h \
wire/onion$(EXP)_wiregen.h \
wire/bolt12$(EXP)_wiregen.h \
wire/common_wiregen.h \
wire/channel_type_wiregen.h \
wire/peer$(EXP)_printgen.h \
wire/onion$(EXP)_printgen.h
@ -24,11 +25,13 @@ WIRE_SRC := wire/wire_sync.c \
wire/common_wiregen.c \
wire/bolt12$(EXP)_wiregen.c \
wire/peer$(EXP)_wiregen.c \
wire/channel_type_wiregen.c \
wire/onion$(EXP)_wiregen.c
WIRE_PRINT_SRC := \
wire/onion$(EXP)_printgen.c \
wire/peer$(EXP)_printgen.c
wire/peer$(EXP)_printgen.c \
wire/channel_type_printgen.c
WIRE_OBJS := $(WIRE_SRC:.c=.o)
WIRE_PRINT_OBJS := $(WIRE_PRINT_SRC:.c=.o)
@ -45,7 +48,8 @@ WIRE_NONEXP_HEADERS := wire/peer_wiregen.h \
wire/onion_wiregen.h \
wire/bolt12_wiregen.h \
wire/peer_printgen.h \
wire/onion_printgen.h
wire/onion_printgen.h \
wire/channel_type_printgen.h
ALL_C_SOURCES += $(WIRE_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC)
@ -125,8 +129,9 @@ wire/onion_wiregen.h_args := --include='bitcoin/short_channel_id.h' --include='b
wire/onion_wiregen.c_args := -s --expose-tlv-type=tlv_payload
# Same for _exp versions
wire/peer_exp_wiregen.h_args := $(wire/peer_wiregen.h_args)
wire/peer_exp_wiregen.h_args := $(wire/peer_wiregen.h_args) --include='wire/channel_type_wiregen.h'
wire/peer_exp_wiregen.c_args := $(wire/peer_wiregen.c_args)
wire/peer_exp_printgen.h_args := --include='wire/channel_type_printgen.h'
wire/onion_exp_wiregen.h_args := $(wire/onion_wiregen.h_args)
wire/onion_exp_wiregen.c_args := $(wire/onion_wiregen.c_args)
@ -138,6 +143,9 @@ wire/bolt12_exp_wiregen.c_args := $(wire/bolt12_wiregen.c_args)
wire/peer_wiregen.h_args := --include='common/channel_id.h' --include='bitcoin/tx.h' --include='bitcoin/preimage.h' --include='bitcoin/short_channel_id.h' --include='common/node_id.h' --include='common/bigsize.h' --include='bitcoin/block.h' --include='bitcoin/privkey.h' -s --expose-tlv-type=n1 --expose-tlv-type=n2
wire/channel_type_wiregen.h_args := -s
wire/channel_type_wiregen.c_args := $(wire/channel_type_wiregen.h_args)
# All generated wire/ files depend on this Makefile
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(WIRE_SRC) $(WIRE_PRINT_SRC) $(WIRE_NONEXP_SRC) $(WIRE_HEADERS) $(WIRE_NONEXP_HEADERS)): wire/Makefile

2
wire/bolt12_wiregen.c generated
View file

@ -1684,4 +1684,4 @@ bool invoice_error_is_valid(const struct tlv_invoice_error *record, size_t *err_
return tlv_fields_valid(record->fields, NULL, err_index);
}
// SHA256STAMP:53c38e8f9d5938a10c80fffa22d9093be51728cf59d3ef13ec477c848e9d48d1
// SHA256STAMP:d6c9a7b168be00b6c823052f1c62bf4fec8792ca81bc9125173af0bd357885f4

2
wire/bolt12_wiregen.h generated
View file

@ -323,4 +323,4 @@ struct fallback_address *fromwire_fallback_address(const tal_t *ctx, const u8 **
#endif /* LIGHTNING_WIRE_BOLT12_WIREGEN_H */
// SHA256STAMP:53c38e8f9d5938a10c80fffa22d9093be51728cf59d3ef13ec477c848e9d48d1
// SHA256STAMP:d6c9a7b168be00b6c823052f1c62bf4fec8792ca81bc9125173af0bd357885f4

View file

@ -0,0 +1,4 @@
# Why not let our generator generate this too?
subtype,channel_type
subtypedata,channel_type,len,u16,
subtypedata,channel_type,features,byte,len
1 # Why not let our generator generate this too?
2 subtype,channel_type
3 subtypedata,channel_type,len,u16,
4 subtypedata,channel_type,features,byte,len

2
wire/common_wiregen.c generated
View file

@ -100,4 +100,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg)
fromwire_u8_array(&cursor, &plen, *msg, msg_len);
return cursor != NULL;
}
// SHA256STAMP:0f582c50fa133054209e1f89e22ae78f969ada0d08ce162c63700051a6a25a9e
// SHA256STAMP:402f88d03a71eaf310e65fcd62fd87becf788a30626ed96c8eab3da538717a60

2
wire/common_wiregen.h generated
View file

@ -41,4 +41,4 @@ bool fromwire_custommsg_out(const tal_t *ctx, const void *p, u8 **msg);
#endif /* LIGHTNING_WIRE_COMMON_WIREGEN_H */
// SHA256STAMP:0f582c50fa133054209e1f89e22ae78f969ada0d08ce162c63700051a6a25a9e
// SHA256STAMP:402f88d03a71eaf310e65fcd62fd87becf788a30626ed96c8eab3da538717a60

View file

@ -1,6 +1,6 @@
--- wire/peer_wire.csv 2021-05-09 15:44:59.166135652 +0930
+++ wire/peer_wire.csv.raw 2021-05-11 09:59:31.695459756 +0930
@@ -221,6 +131,18 @@
@@ -221,6 +131,15 @@
msgdata,channel_reestablish,next_revocation_number,u64,
msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32
msgdata,channel_reestablish,my_current_per_commitment_point,point,
@ -13,9 +13,6 @@
+tlvdata,channel_reestablish_tlvs,current_type,type,channel_type,
+tlvtype,channel_reestablish_tlvs,upgradable,7
+tlvdata,channel_reestablish_tlvs,upgradable,upgrades,channel_type,...
+subtype,channel_type
+subtypedata,channel_type,len,u16,
+subtypedata,channel_type,features,byte,len
msgtype,announcement_signatures,259
msgdata,announcement_signatures,channel_id,channel_id,
msgdata,announcement_signatures,short_channel_id,short_channel_id,

2
wire/onion_printgen.c generated
View file

@ -859,4 +859,4 @@ void printonion_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_encmsg_tlvs, ARRAY_SIZE(print_tlvs_encmsg_tlvs));
}
}
// SHA256STAMP:a2a9a3075de158a886d768a148ca3dde70956188f7be6cc141cce25211cf1258
// SHA256STAMP:09dc1e023332a80d6e5b948472d121823404a3d7bfc843142b00ead7892148a1

2
wire/onion_printgen.h generated
View file

@ -58,4 +58,4 @@ void printwire_mpp_timeout(const char *fieldname, const u8 *cursor);
void printwire_onionmsg_path(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_ONION_PRINTGEN_H */
// SHA256STAMP:a2a9a3075de158a886d768a148ca3dde70956188f7be6cc141cce25211cf1258
// SHA256STAMP:09dc1e023332a80d6e5b948472d121823404a3d7bfc843142b00ead7892148a1

2
wire/onion_wiregen.c generated
View file

@ -1026,4 +1026,4 @@ bool fromwire_mpp_timeout(const void *p)
return false;
return cursor != NULL;
}
// SHA256STAMP:a2a9a3075de158a886d768a148ca3dde70956188f7be6cc141cce25211cf1258
// SHA256STAMP:09dc1e023332a80d6e5b948472d121823404a3d7bfc843142b00ead7892148a1

2
wire/onion_wiregen.h generated
View file

@ -317,4 +317,4 @@ bool fromwire_mpp_timeout(const void *p);
#endif /* LIGHTNING_WIRE_ONION_WIREGEN_H */
// SHA256STAMP:a2a9a3075de158a886d768a148ca3dde70956188f7be6cc141cce25211cf1258
// SHA256STAMP:09dc1e023332a80d6e5b948472d121823404a3d7bfc843142b00ead7892148a1

2
wire/peer_printgen.c generated
View file

@ -3139,4 +3139,4 @@ void printpeer_wire_tlv_message(const char *tlv_name, const u8 *msg) {
printwire_tlvs(tlv_name, &msg, &plen, print_tlvs_onion_message_tlvs, ARRAY_SIZE(print_tlvs_onion_message_tlvs));
}
}
// SHA256STAMP:bf392c19e6fd1e87040d84d0de259dcec0fa52b4d78e613629ef049e373e1d78
// SHA256STAMP:594dbd4e700334431fccd0dc7bd7ef22ca033299d24ba92f920601a807291c64

2
wire/peer_printgen.h generated
View file

@ -99,4 +99,4 @@ void printwire_channel_update_checksums(const char *fieldname, const u8 **cursor
void printwire_channel_update_timestamps(const char *fieldname, const u8 **cursor, size_t *plen);
void printwire_witness_stack(const char *fieldname, const u8 **cursor, size_t *plen);
#endif /* LIGHTNING_WIRE_PEER_PRINTGEN_H */
// SHA256STAMP:bf392c19e6fd1e87040d84d0de259dcec0fa52b4d78e613629ef049e373e1d78
// SHA256STAMP:594dbd4e700334431fccd0dc7bd7ef22ca033299d24ba92f920601a807291c64

2
wire/peer_wiregen.c generated
View file

@ -2589,4 +2589,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
*htlc_maximum_msat = fromwire_amount_msat(&cursor, &plen);
return cursor != NULL;
}
// SHA256STAMP:bf392c19e6fd1e87040d84d0de259dcec0fa52b4d78e613629ef049e373e1d78
// SHA256STAMP:594dbd4e700334431fccd0dc7bd7ef22ca033299d24ba92f920601a807291c64

2
wire/peer_wiregen.h generated
View file

@ -981,4 +981,4 @@ bool fromwire_channel_update_option_channel_htlc_max(const void *p, secp256k1_ec
#endif /* LIGHTNING_WIRE_PEER_WIREGEN_H */
// SHA256STAMP:bf392c19e6fd1e87040d84d0de259dcec0fa52b4d78e613629ef049e373e1d78
// SHA256STAMP:594dbd4e700334431fccd0dc7bd7ef22ca033299d24ba92f920601a807291c64

View file

@ -12,6 +12,7 @@
#include <ccan/str/hex/hex.h>
#include <common/amount.h>
#include <common/bigsize.h>
#include <common/channel_type.h>
#include <bitcoin/chainparams.h>
#include <common/setup.h>
#include <common/sphinx.h>
@ -21,6 +22,12 @@
extern secp256k1_context *secp256k1_ctx;
/* AUTOGENERATED MOCKS START */
/* Generated stub for fromwire_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type called!\n"); abort(); }
/* Generated stub for towire_channel_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* memsetting pubkeys doesn't work */

View file

@ -1,5 +1,6 @@
#include <ccan/array_size/array_size.h>
#include <ccan/str/hex/hex.h>
#include <common/channel_type.h>
#include <common/utils.h>
#include <stdio.h>
#include <wally_core.h>
@ -28,9 +29,15 @@ static const char *reason;
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_channel_type */
struct channel_type *fromwire_channel_type(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *plen UNNEEDED)
{ fprintf(stderr, "fromwire_channel_type 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_type */
void towire_channel_type(u8 **p UNNEEDED, const struct channel_type *channel_type UNNEEDED)
{ fprintf(stderr, "towire_channel_type called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */