diff --git a/bitcoin/base58.c b/bitcoin/base58.c index e874b0b8e..0af71d8f3 100644 --- a/bitcoin/base58.c +++ b/bitcoin/base58.c @@ -65,63 +65,8 @@ static bool from_base58(u8 *version, return true; } -bool bitcoin_from_base58(u8 *version, struct bitcoin_address *addr, - const char *base58, size_t len) -{ - return from_base58(version, &addr->addr, base58, len); -} - - -bool p2sh_from_base58(u8 *version, struct ripemd160 *p2sh, const char *base58, - size_t len) -{ - - return from_base58(version, p2sh, base58, len); -} - bool ripemd160_from_base58(u8 *version, struct ripemd160 *rmd, const char *base58, size_t base58_len) { return from_base58(version, rmd, base58, base58_len); } - -bool key_from_base58(const char *base58, size_t base58_len, - bool *test_net, struct privkey *priv, struct pubkey *key) -{ - // 1 byte version, 32 byte private key, 1 byte compressed, 4 byte checksum - u8 keybuf[1 + 32 + 1 + 4]; - char *terminated_base58 = tal_dup_arr(NULL, char, base58, base58_len, 1); - terminated_base58[base58_len] = '\0'; - size_t keybuflen = sizeof(keybuf); - - - size_t written = 0; - int r = wally_base58_to_bytes(terminated_base58, BASE58_FLAG_CHECKSUM, keybuf, keybuflen, &written); - wally_bzero(terminated_base58, base58_len + 1); - tal_free(terminated_base58); - if (r != WALLY_OK || written > keybuflen) - return false; - - /* Byte after key should be 1 to represent a compressed key. */ - if (keybuf[1 + 32] != 1) - return false; - - if (keybuf[0] == 128) - *test_net = false; - else if (keybuf[0] == 239) - *test_net = true; - else - return false; - - /* Copy out secret. */ - memcpy(priv->secret.data, keybuf + 1, sizeof(priv->secret.data)); - - if (!secp256k1_ec_seckey_verify(secp256k1_ctx, priv->secret.data)) - return false; - - /* Get public key, too. */ - if (!pubkey_from_privkey(priv, key)) - return false; - - return true; -} diff --git a/bitcoin/base58.h b/bitcoin/base58.h index 0af3a16bd..b5a9b5050 100644 --- a/bitcoin/base58.h +++ b/bitcoin/base58.h @@ -12,17 +12,10 @@ struct bitcoin_address; /* Bitcoin address encoded in base58, with version and checksum */ char *bitcoin_to_base58(const tal_t *ctx, const struct chainparams *chainparams, const struct bitcoin_address *addr); -bool bitcoin_from_base58(u8 *version, struct bitcoin_address *addr, - const char *base58, size_t len); /* P2SH address encoded as base58, with version and checksum */ char *p2sh_to_base58(const tal_t *ctx, const struct chainparams *chainparams, const struct ripemd160 *p2sh); -bool p2sh_from_base58(u8 *version, struct ripemd160 *p2sh, const char *base58, - size_t len); - -bool key_from_base58(const char *base58, size_t base58_len, - bool *test_net, struct privkey *priv, struct pubkey *key); /* Decode a p2pkh or p2sh into the ripemd160 hash */ bool ripemd160_from_base58(u8 *version, struct ripemd160 *rmd, diff --git a/bitcoin/block.c b/bitcoin/block.c index bd8446cbd..5e037e4f4 100644 --- a/bitcoin/block.c +++ b/bitcoin/block.c @@ -229,19 +229,8 @@ void bitcoin_block_blkid(const struct bitcoin_block *b, *out = b->hdr.hash; } -/* We do the same hex-reversing crud as txids. */ -bool bitcoin_blkid_from_hex(const char *hexstr, size_t hexstr_len, - struct bitcoin_blkid *blockid) -{ - struct bitcoin_txid fake_txid; - if (!bitcoin_txid_from_hex(hexstr, hexstr_len, &fake_txid)) - return false; - blockid->shad = fake_txid.shad; - return true; -} - -bool bitcoin_blkid_to_hex(const struct bitcoin_blkid *blockid, - char *hexstr, size_t hexstr_len) +static bool bitcoin_blkid_to_hex(const struct bitcoin_blkid *blockid, + char *hexstr, size_t hexstr_len) { struct bitcoin_txid fake_txid; fake_txid.shad = blockid->shad; diff --git a/bitcoin/block.h b/bitcoin/block.h index e6f460a9b..546a7371f 100644 --- a/bitcoin/block.h +++ b/bitcoin/block.h @@ -45,14 +45,6 @@ bitcoin_block_from_hex(const tal_t *ctx, const struct chainparams *chainparams, void bitcoin_block_blkid(const struct bitcoin_block *block, struct bitcoin_blkid *out); -/* Parse hex string to get blockid (reversed, a-la bitcoind). */ -bool bitcoin_blkid_from_hex(const char *hexstr, size_t hexstr_len, - struct bitcoin_blkid *blockid); - -/* Get hex string of blockid (reversed, a-la bitcoind). */ -bool bitcoin_blkid_to_hex(const struct bitcoin_blkid *blockid, - char *hexstr, size_t hexstr_len); - /* Marshalling/unmarshaling over the wire */ void towire_bitcoin_blkid(u8 **pptr, const struct bitcoin_blkid *blkid); void fromwire_bitcoin_blkid(const u8 **cursor, size_t *max, diff --git a/bitcoin/chainparams.c b/bitcoin/chainparams.c index d253e04ac..d1e615866 100644 --- a/bitcoin/chainparams.c +++ b/bitcoin/chainparams.c @@ -226,14 +226,6 @@ const struct chainparams *chainparams_for_network(const char *network_name) return NULL; } -const struct chainparams **chainparams_for_networks(const tal_t *ctx) -{ - const struct chainparams **params = tal_arr(ctx, const struct chainparams*, 0); - for (size_t i = 0; i < ARRAY_SIZE(networks); i++) - tal_arr_expand(¶ms, &networks[i]); - return params; -} - const struct chainparams *chainparams_by_chainhash(const struct bitcoin_blkid *chain_hash) { for (size_t i = 0; i < ARRAY_SIZE(networks); i++) { diff --git a/bitcoin/chainparams.h b/bitcoin/chainparams.h index 0a4cc5a3f..dc16852f2 100644 --- a/bitcoin/chainparams.h +++ b/bitcoin/chainparams.h @@ -41,12 +41,6 @@ struct chainparams { */ const struct chainparams *chainparams_for_network(const char *network_name); -/** - * chainparams_for_networks - Get blockchain parameters for all known networks, - * as a tal array. - */ -const struct chainparams **chainparams_for_networks(const tal_t *ctx); - /** * chainparams_by_bip173 - Helper to get a network by its bip173 name * diff --git a/bitcoin/locktime.c b/bitcoin/locktime.c index d8ce95aa7..5bbaedff3 100644 --- a/bitcoin/locktime.c +++ b/bitcoin/locktime.c @@ -23,60 +23,13 @@ static bool abs_is_seconds(u32 locktime) return locktime >= SECONDS_POINT; } -bool rel_locktime_is_seconds(const struct rel_locktime *rel) -{ - return rel->locktime & BIP68_SECONDS_FLAG; -} - -u32 rel_locktime_to_seconds(const struct rel_locktime *rel) -{ - assert(rel_locktime_is_seconds(rel)); - return (rel->locktime & BIP68_LOCKTIME_MASK) << BIP68_SECONDS_SHIFT; -} - -u32 rel_locktime_to_blocks(const struct rel_locktime *rel) -{ - assert(!rel_locktime_is_seconds(rel)); - return rel->locktime & BIP68_LOCKTIME_MASK; -} - bool blocks_to_abs_locktime(u32 blocks, struct abs_locktime *abs) { return abs_blocks_to_locktime(blocks, &abs->locktime); } -bool abs_locktime_is_seconds(const struct abs_locktime *abs) -{ - return abs_is_seconds(abs->locktime); -} - -u32 abs_locktime_to_seconds(const struct abs_locktime *abs) -{ - assert(abs_locktime_is_seconds(abs)); - return abs->locktime; -} - u32 abs_locktime_to_blocks(const struct abs_locktime *abs) { - assert(!abs_locktime_is_seconds(abs)); + assert(!abs_is_seconds(abs->locktime)); return abs->locktime; } - -static char *fmt_rel_locktime(const tal_t *ctx, const struct rel_locktime *rl) -{ - if (rel_locktime_is_seconds(rl)) - return tal_fmt(ctx, "+%usec", rel_locktime_to_seconds(rl)); - else - return tal_fmt(ctx, "+%ublocks", rel_locktime_to_blocks(rl)); -} - -static char *fmt_abs_locktime(const tal_t *ctx, const struct abs_locktime *al) -{ - if (abs_locktime_is_seconds(al)) - return tal_fmt(ctx, "%usec", abs_locktime_to_seconds(al)); - else - return tal_fmt(ctx, "%ublocks", abs_locktime_to_blocks(al)); -} - -REGISTER_TYPE_TO_STRING(rel_locktime, fmt_rel_locktime); -REGISTER_TYPE_TO_STRING(abs_locktime, fmt_abs_locktime); diff --git a/bitcoin/locktime.h b/bitcoin/locktime.h index ca9ac1527..fc99ca82d 100644 --- a/bitcoin/locktime.h +++ b/bitcoin/locktime.h @@ -4,23 +4,12 @@ #include #include -/* As used by nSequence and OP_CHECKSEQUENCEVERIFY (BIP68) */ -struct rel_locktime { - u32 locktime; -}; - -bool rel_locktime_is_seconds(const struct rel_locktime *rel); -u32 rel_locktime_to_seconds(const struct rel_locktime *rel); -u32 rel_locktime_to_blocks(const struct rel_locktime *rel); - /* As used by nLocktime and OP_CHECKLOCKTIMEVERIFY (BIP65) */ struct abs_locktime { u32 locktime; }; bool blocks_to_abs_locktime(u32 blocks, struct abs_locktime *abs); -bool abs_locktime_is_seconds(const struct abs_locktime *abs); -u32 abs_locktime_to_seconds(const struct abs_locktime *abs); u32 abs_locktime_to_blocks(const struct abs_locktime *abs); #endif /* LIGHTNING_BITCOIN_LOCKTIME_H */ diff --git a/bitcoin/psbt.c b/bitcoin/psbt.c index 17937695c..f3fda99ed 100644 --- a/bitcoin/psbt.c +++ b/bitcoin/psbt.c @@ -12,7 +12,7 @@ #include -void psbt_destroy(struct wally_psbt *psbt) +static void psbt_destroy(struct wally_psbt *psbt) { wally_psbt_free(psbt); } @@ -430,17 +430,6 @@ bool psbt_has_input(const struct wally_psbt *psbt, return false; } -bool psbt_input_set_redeemscript(struct wally_psbt *psbt, size_t in, - const u8 *redeemscript) -{ - int wally_err; - assert(psbt->num_inputs > in); - wally_err = wally_psbt_input_set_redeem_script(&psbt->inputs[in], - redeemscript, - tal_bytelen(redeemscript)); - return wally_err == WALLY_OK; -} - struct amount_sat psbt_input_get_amount(const struct wally_psbt *psbt, size_t in) { @@ -558,9 +547,9 @@ void psbt_input_set_unknown(const tal_t *ctx, abort(); } -void *psbt_get_unknown(const struct wally_map *map, - const u8 *key, - size_t *val_len) +static void *psbt_get_unknown(const struct wally_map *map, + const u8 *key, + size_t *val_len) { size_t index; diff --git a/bitcoin/psbt.h b/bitcoin/psbt.h index 386ef7a71..3aadc5028 100644 --- a/bitcoin/psbt.h +++ b/bitcoin/psbt.h @@ -17,18 +17,6 @@ struct bitcoin_signature; struct bitcoin_txid; struct pubkey; -/** psbt_destroy - Destroy a PSBT that is not tal-allocated - * - * @psbt - the PSBT to destroy - * - * WARNING Do NOT call this function directly if you got the - * PSBT from create_psbt, new_psbt, psbt_from_bytes, - * psbt_from_b64, or fromwire_wally_psbt. - * Those functions register this function as a `tal_destructor` - * automatically. - */ -void psbt_destroy(struct wally_psbt *psbt); - /** * create_psbt - Create a new psbt object * @@ -172,16 +160,7 @@ WARN_UNUSED_RESULT bool psbt_input_set_signature(struct wally_psbt *psbt, size_t const struct bitcoin_signature *sig); void psbt_input_set_witscript(struct wally_psbt *psbt, size_t in, const u8 *wscript); -void psbt_elements_input_init(struct wally_psbt *psbt, size_t in, - const u8 *scriptPubkey, - struct amount_asset *asset, - const u8 *nonce); -void psbt_elements_input_init_witness(struct wally_psbt *psbt, size_t in, - const u8 *witscript, - struct amount_asset *asset, - const u8 *nonce); -bool psbt_input_set_redeemscript(struct wally_psbt *psbt, size_t in, - const u8 *redeemscript); + /* psbt_input_set_unknown - Set the given Key-Value in the psbt's input keymap * @ctx - tal context for allocations * @in - psbt input to set key-value on @@ -194,16 +173,6 @@ void psbt_input_set_unknown(const tal_t *ctx, const u8 *key, const void *value, size_t value_len); -/* psbt_get_unknown - Fetch the value from the given map at key - * - * @map - map of unknowns to search for key - * @key - key of key-value pair to return value for - * @value_len - (out) length of value (if found) - * - * Returns: value at @key, or NULL if not found */ -void *psbt_get_unknown(const struct wally_map *map, - const u8 *key, - size_t *val_len); /* psbt_get_lightning - Fetch a proprietary lightning value from the given map * diff --git a/bitcoin/pubkey.c b/bitcoin/pubkey.c index 80807813f..00ce2f139 100644 --- a/bitcoin/pubkey.c +++ b/bitcoin/pubkey.c @@ -71,7 +71,7 @@ char *pubkey_to_hexstr(const tal_t *ctx, const struct pubkey *key) } REGISTER_TYPE_TO_STRING(pubkey, pubkey_to_hexstr); -char *secp256k1_pubkey_to_hexstr(const tal_t *ctx, const secp256k1_pubkey *key) +static char *secp256k1_pubkey_to_hexstr(const tal_t *ctx, const secp256k1_pubkey *key) { unsigned char der[PUBKEY_CMPR_LEN]; size_t outlen = sizeof(der); @@ -150,7 +150,7 @@ void towire_point32(u8 **pptr, const struct point32 *point32) towire(pptr, output, sizeof(output)); } -char *point32_to_hexstr(const tal_t *ctx, const struct point32 *point32) +static char *point32_to_hexstr(const tal_t *ctx, const struct point32 *point32) { u8 output[32]; diff --git a/bitcoin/pubkey.h b/bitcoin/pubkey.h index 4474c91c9..3eb52add0 100644 --- a/bitcoin/pubkey.h +++ b/bitcoin/pubkey.h @@ -32,9 +32,6 @@ bool pubkey_from_hexstr(const char *derstr, size_t derlen, struct pubkey *key); /* Convert from hex string of DER (scriptPubKey from validateaddress) */ char *pubkey_to_hexstr(const tal_t *ctx, const struct pubkey *key); -/* Convenience wrapper for a raw secp256k1_pubkey */ -char *secp256k1_pubkey_to_hexstr(const tal_t *ctx, const secp256k1_pubkey *key); - /* Point from secret */ bool pubkey_from_secret(const struct secret *secret, struct pubkey *key); @@ -75,5 +72,4 @@ void fromwire_pubkey(const u8 **cursor, size_t *max, struct pubkey *pubkey); void towire_point32(u8 **pptr, const struct point32 *pubkey); void fromwire_point32(const u8 **cursor, size_t *max, struct point32 *pubkey); -char *point32_to_hexstr(const tal_t *ctx, const struct point32 *point32); #endif /* LIGHTNING_BITCOIN_PUBKEY_H */ diff --git a/bitcoin/script.c b/bitcoin/script.c index 805a44a96..316388696 100644 --- a/bitcoin/script.c +++ b/bitcoin/script.c @@ -187,13 +187,6 @@ u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr) return script; } -u8 *scriptpubkey_opreturn(const tal_t *ctx) -{ - u8 *script = tal_arr(ctx, u8, 0); - - add_op(&script, OP_RETURN); - return script; -} u8 *scriptpubkey_opreturn_padded(const tal_t *ctx) { u8 *script = tal_arr(ctx, u8, 0); diff --git a/bitcoin/script.h b/bitcoin/script.h index 6ef701f0b..89f225ae8 100644 --- a/bitcoin/script.h +++ b/bitcoin/script.h @@ -27,8 +27,6 @@ u8 *scriptpubkey_p2sh_hash(const tal_t *ctx, const struct ripemd160 *redeemhash) /* Create an output script using p2pkh */ u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr); -/* Create a prunable output script */ -u8 *scriptpubkey_opreturn(const tal_t *ctx); /* Create a prunable output script with 20 random bytes. * This is needed since a spend from a p2wpkh to an `OP_RETURN` without * any other outputs would result in a transaction smaller than the diff --git a/bitcoin/short_channel_id.c b/bitcoin/short_channel_id.c index ff77ee2ac..d6c341cea 100644 --- a/bitcoin/short_channel_id.c +++ b/bitcoin/short_channel_id.c @@ -78,8 +78,8 @@ bool short_channel_id_dir_from_str(const char *str, size_t strlen, return true; } -char *short_channel_id_dir_to_str(const tal_t *ctx, - const struct short_channel_id_dir *scidd) +static char *short_channel_id_dir_to_str(const tal_t *ctx, + const struct short_channel_id_dir *scidd) { char *str, *scidstr = short_channel_id_to_str(NULL, &scidd->scid); str = tal_fmt(ctx, "%s/%u", scidstr, scidd->dir); @@ -96,22 +96,8 @@ void towire_short_channel_id(u8 **pptr, towire_u64(pptr, short_channel_id->u64); } -void towire_short_channel_id_dir(u8 **pptr, - const struct short_channel_id_dir *scidd) -{ - towire_short_channel_id(pptr, &scidd->scid); - towire_bool(pptr, scidd->dir); -} - void fromwire_short_channel_id(const u8 **cursor, size_t *max, struct short_channel_id *short_channel_id) { short_channel_id->u64 = fromwire_u64(cursor, max); } - -void fromwire_short_channel_id_dir(const u8 **cursor, size_t *max, - struct short_channel_id_dir *scidd) -{ - fromwire_short_channel_id(cursor, max, &scidd->scid); - scidd->dir = fromwire_bool(cursor, max); -} diff --git a/bitcoin/short_channel_id.h b/bitcoin/short_channel_id.h index 240772987..bac77d8d8 100644 --- a/bitcoin/short_channel_id.h +++ b/bitcoin/short_channel_id.h @@ -69,17 +69,10 @@ char *short_channel_id_to_str(const tal_t *ctx, const struct short_channel_id *s bool WARN_UNUSED_RESULT short_channel_id_dir_from_str(const char *str, size_t strlen, struct short_channel_id_dir *scidd); -char *short_channel_id_dir_to_str(const tal_t *ctx, - const struct short_channel_id_dir *scidd); - /* Marshal/unmarshal */ void towire_short_channel_id(u8 **pptr, const struct short_channel_id *short_channel_id); -void towire_short_channel_id_dir(u8 **pptr, - const struct short_channel_id_dir *scidd); void fromwire_short_channel_id(const u8 **cursor, size_t *max, struct short_channel_id *short_channel_id); -void fromwire_short_channel_id_dir(const u8 **cursor, size_t *max, - struct short_channel_id_dir *scidd); #endif /* LIGHTNING_BITCOIN_SHORT_CHANNEL_ID_H */ diff --git a/bitcoin/test/run-bitcoin_block_from_hex.c b/bitcoin/test/run-bitcoin_block_from_hex.c index c00d99778..96d4e5120 100644 --- a/bitcoin/test/run-bitcoin_block_from_hex.c +++ b/bitcoin/test/run-bitcoin_block_from_hex.c @@ -43,22 +43,12 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_fail */ void *fromwire_fail(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_fail called!\n"); abort(); } /* Generated stub for fromwire_sha256 */ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "fromwire_sha256 called!\n"); abort(); } -/* Generated stub for fromwire_tal_arrn */ -u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, - const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) -{ fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -77,15 +67,9 @@ void script_push_bytes(u8 **scriptp UNNEEDED, const void *mem UNNEEDED, size_t l /* Generated stub for scriptpubkey_p2wsh */ u8 *scriptpubkey_p2wsh(const tal_t *ctx UNNEEDED, const u8 *witnessscript UNNEEDED) { fprintf(stderr, "scriptpubkey_p2wsh called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } @@ -144,6 +128,15 @@ static const char block[] = STRUCTEQ_DEF(sha256_double, 0, sha); +static bool bitcoin_blkid_from_hex(const char *hexstr, size_t hexstr_len, + struct bitcoin_blkid *blockid) +{ + struct bitcoin_txid fake_txid; + if (!bitcoin_txid_from_hex(hexstr, hexstr_len, &fake_txid)) + return false; + blockid->shad = fake_txid.shad; + return true; +} int main(int argc, const char *argv[]) { struct bitcoin_blkid prev; diff --git a/bitcoin/test/run-tx-encode.c b/bitcoin/test/run-tx-encode.c index 7fb160b19..1aae8e581 100644 --- a/bitcoin/test/run-tx-encode.c +++ b/bitcoin/test/run-tx-encode.c @@ -44,22 +44,12 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_fail */ void *fromwire_fail(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_fail called!\n"); abort(); } /* Generated stub for fromwire_sha256 */ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "fromwire_sha256 called!\n"); abort(); } -/* Generated stub for fromwire_tal_arrn */ -u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, - const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) -{ fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -78,15 +68,9 @@ void script_push_bytes(u8 **scriptp UNNEEDED, const void *mem UNNEEDED, size_t l /* Generated stub for scriptpubkey_p2wsh */ u8 *scriptpubkey_p2wsh(const tal_t *ctx UNNEEDED, const u8 *witnessscript UNNEEDED) { fprintf(stderr, "scriptpubkey_p2wsh called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 81a5635c7..318a2ec94 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -97,16 +97,6 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script, return i; } -int bitcoin_tx_add_multi_outputs(struct bitcoin_tx *tx, - struct bitcoin_tx_output **outputs) -{ - for (size_t j = 0; j < tal_count(outputs); j++) - bitcoin_tx_add_output(tx, outputs[j]->script, - NULL, outputs[j]->amount); - - return tx->wtx->num_outputs; -} - bool elements_wtx_output_is_fee(const struct wally_tx *tx, int outnum) { assert(outnum < tx->num_outputs); @@ -376,20 +366,6 @@ void bitcoin_tx_input_set_script(struct bitcoin_tx *tx, int innum, u8 *script) tal_wally_end(tx->psbt); } -const u8 *bitcoin_tx_input_get_witness(const tal_t *ctx, - const struct bitcoin_tx *tx, int innum, - int witnum) -{ - const u8 *witness_item; - struct wally_tx_witness_item *item; - assert(innum < tx->wtx->num_inputs); - assert(witnum < tx->wtx->inputs[innum].witness->num_items); - item = &tx->wtx->inputs[innum].witness->items[witnum]; - witness_item = - tal_dup_arr(ctx, u8, item->witness, item->witness_len, 0); - return witness_item; -} - /* FIXME: remove */ void bitcoin_tx_input_get_txid(const struct bitcoin_tx *tx, int innum, struct bitcoin_txid *out) @@ -747,16 +723,6 @@ struct bitcoin_tx *fromwire_bitcoin_tx(const tal_t *ctx, return tx; } -struct wally_tx *fromwire_wally_tx(const tal_t *ctx, - const u8 **cursor, size_t *max) -{ - struct wally_tx *wtx; - wtx = pull_wtx(ctx, cursor, max); - if (!wtx) - return fromwire_fail(cursor, max); - return wtx; -} - void towire_bitcoin_txid(u8 **pptr, const struct bitcoin_txid *txid) { towire_sha256_double(pptr, &txid->shad); @@ -784,31 +750,6 @@ void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx) towire_wally_psbt(pptr, tx->psbt); } -void towire_wally_tx(u8 **pptr, const struct wally_tx *wtx) -{ - u8 *lin = linearize_wtx(tmpctx, wtx); - towire_u8_array(pptr, lin, tal_count(lin)); -} - -struct bitcoin_tx_output *fromwire_bitcoin_tx_output(const tal_t *ctx, - const u8 **cursor, size_t *max) -{ - struct bitcoin_tx_output *output = tal(ctx, struct bitcoin_tx_output); - output->amount = fromwire_amount_sat(cursor, max); - u16 script_len = fromwire_u16(cursor, max); - output->script = fromwire_tal_arrn(output, cursor, max, script_len); - if (!*cursor) - return tal_free(output); - return output; -} - -void towire_bitcoin_tx_output(u8 **pptr, const struct bitcoin_tx_output *output) -{ - towire_amount_sat(pptr, output->amount); - towire_u16(pptr, tal_count(output->script)); - towire_u8_array(pptr, output->script, tal_count(output->script)); -} - bool wally_tx_input_spends(const struct wally_tx_input *input, const struct bitcoin_outpoint *outpoint) { diff --git a/bitcoin/tx.h b/bitcoin/tx.h index b6583948d..85bb38444 100644 --- a/bitcoin/tx.h +++ b/bitcoin/tx.h @@ -99,10 +99,6 @@ int bitcoin_tx_add_output(struct bitcoin_tx *tx, const u8 *script, u8 *wscript, struct amount_sat amount); -/* Add mutiple output to tx. */ -int bitcoin_tx_add_multi_outputs(struct bitcoin_tx *tx, - struct bitcoin_tx_output **outputs); - /* Set the locktime for a transaction */ void bitcoin_tx_set_locktime(struct bitcoin_tx *tx, u32 locktime); @@ -186,13 +182,6 @@ void bitcoin_tx_input_set_witness(struct bitcoin_tx *tx, int innum, */ void bitcoin_tx_input_set_script(struct bitcoin_tx *tx, int innum, u8 *script); -/** - * Helper to get a witness as a tal_arr array. - */ -const u8 *bitcoin_tx_input_get_witness(const tal_t *ctx, - const struct bitcoin_tx *tx, int innum, - int witnum); - /** * Wrap the raw txhash in the wally_tx_input into a bitcoin_txid */ @@ -260,13 +249,8 @@ void fromwire_bitcoin_txid(const u8 **cursor, size_t *max, struct bitcoin_txid *txid); struct bitcoin_tx *fromwire_bitcoin_tx(const tal_t *ctx, const u8 **cursor, size_t *max); -struct bitcoin_tx_output *fromwire_bitcoin_tx_output(const tal_t *ctx, - const u8 **cursor, size_t *max); -struct wally_tx *fromwire_wally_tx(const tal_t *ctx, const u8 **cursor, size_t *max); void towire_bitcoin_txid(u8 **pptr, const struct bitcoin_txid *txid); void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx); -void towire_bitcoin_tx_output(u8 **pptr, const struct bitcoin_tx_output *output); -void towire_wally_tx(u8 **pptr, const struct wally_tx *wtx); void towire_bitcoin_outpoint(u8 **pptr, const struct bitcoin_outpoint *outp); void fromwire_bitcoin_outpoint(const u8 **cursor, size_t *max, struct bitcoin_outpoint *outp); diff --git a/common/test/run-amount.c b/common/test/run-amount.c index de4ac8458..923f0a9b7 100644 --- a/common/test/run-amount.c +++ b/common/test/run-amount.c @@ -24,9 +24,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -52,9 +49,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-base64.c b/common/test/run-base64.c index 3261d998f..97571a552 100644 --- a/common/test/run-base64.c +++ b/common/test/run-base64.c @@ -44,9 +44,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -64,9 +61,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -82,9 +76,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -95,9 +86,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-bigsize.c b/common/test/run-bigsize.c index 85c82a2ac..d972f17e2 100644 --- a/common/test/run-bigsize.c +++ b/common/test/run-bigsize.c @@ -45,9 +45,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -65,9 +62,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -93,9 +87,6 @@ char *json_member_direct(struct json_stream *js UNNEEDED, /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -106,9 +97,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-bolt12_decode.c b/common/test/run-bolt12_decode.c index a975a253f..68732b035 100644 --- a/common/test/run-bolt12_decode.c +++ b/common/test/run-bolt12_decode.c @@ -50,9 +50,6 @@ int features_unsupported(const struct feature_set *our_features UNNEEDED, /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -82,9 +79,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -128,9 +122,6 @@ struct tlv_offer *tlv_offer_new(const tal_t *ctx UNNEEDED) /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -150,9 +141,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-bolt12_period.c b/common/test/run-bolt12_period.c index e82ab6a0d..933e8c0d7 100644 --- a/common/test/run-bolt12_period.c +++ b/common/test/run-bolt12_period.c @@ -53,9 +53,6 @@ bool from_bech32_charset(const tal_t *ctx UNNEEDED, /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -85,9 +82,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -135,9 +129,6 @@ char *to_bech32_charset(const tal_t *ctx UNNEEDED, /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -157,9 +148,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-cryptomsg.c b/common/test/run-cryptomsg.c index 963e49648..39e18f9df 100644 --- a/common/test/run-cryptomsg.c +++ b/common/test/run-cryptomsg.c @@ -40,9 +40,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -60,9 +57,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -78,9 +72,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -91,9 +82,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-derive_basepoints.c b/common/test/run-derive_basepoints.c index e7ebaab86..e53b89754 100644 --- a/common/test/run-derive_basepoints.c +++ b/common/test/run-derive_basepoints.c @@ -46,9 +46,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -66,9 +63,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -84,9 +78,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -97,9 +88,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-features.c b/common/test/run-features.c index e93870521..3e7dbd6db 100644 --- a/common/test/run-features.c +++ b/common/test/run-features.c @@ -39,9 +39,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -77,9 +74,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/common/test/run-gossip_rcvd_filter.c b/common/test/run-gossip_rcvd_filter.c index 270df9bd4..473229bde 100644 --- a/common/test/run-gossip_rcvd_filter.c +++ b/common/test/run-gossip_rcvd_filter.c @@ -37,18 +37,12 @@ struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u /* Generated stub for amount_tx_fee */ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) { fprintf(stderr, "amount_tx_fee called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for memleak_remove_htable */ void memleak_remove_htable(struct htable *memtable UNNEEDED, const struct htable *ht UNNEEDED) { fprintf(stderr, "memleak_remove_htable called!\n"); abort(); } /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -59,9 +53,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-gossmap-fp16.c b/common/test/run-gossmap-fp16.c index a3df4b47f..b7b5ff1ca 100644 --- a/common/test/run-gossmap-fp16.c +++ b/common/test/run-gossmap-fp16.c @@ -40,9 +40,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -60,9 +57,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -78,9 +72,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -91,9 +82,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-gossmap_guess_node_id.c b/common/test/run-gossmap_guess_node_id.c index 8b4188bc5..bf0f55b79 100644 --- a/common/test/run-gossmap_guess_node_id.c +++ b/common/test/run-gossmap_guess_node_id.c @@ -41,9 +41,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -61,9 +58,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -79,9 +73,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -92,9 +83,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-ip_port_parsing.c b/common/test/run-ip_port_parsing.c index 2be030de6..6e386dff4 100644 --- a/common/test/run-ip_port_parsing.c +++ b/common/test/run-ip_port_parsing.c @@ -41,9 +41,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -79,9 +76,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/common/test/run-json_remove.c b/common/test/run-json_remove.c index 06b659603..f821b95f4 100644 --- a/common/test/run-json_remove.c +++ b/common/test/run-json_remove.c @@ -39,9 +39,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -59,9 +56,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -87,9 +81,6 @@ char *json_member_direct(struct json_stream *js UNNEEDED, /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -100,9 +91,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-json_scan.c b/common/test/run-json_scan.c index 2da211996..230a5348d 100644 --- a/common/test/run-json_scan.c +++ b/common/test/run-json_scan.c @@ -39,9 +39,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -59,9 +56,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -87,9 +81,6 @@ char *json_member_direct(struct json_stream *js UNNEEDED, /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -100,9 +91,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-key_derive.c b/common/test/run-key_derive.c index 3c98cb50b..25f246b27 100644 --- a/common/test/run-key_derive.c +++ b/common/test/run-key_derive.c @@ -44,9 +44,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -64,9 +61,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -82,9 +76,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -95,9 +86,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-lease_rates.c b/common/test/run-lease_rates.c index 034134bf0..5d8b7d0e8 100644 --- a/common/test/run-lease_rates.c +++ b/common/test/run-lease_rates.c @@ -28,9 +28,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -59,9 +56,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-psbt_diff.c b/common/test/run-psbt_diff.c index 9312010d6..4c8ff0587 100644 --- a/common/test/run-psbt_diff.c +++ b/common/test/run-psbt_diff.c @@ -25,9 +25,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -56,9 +53,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-softref.c b/common/test/run-softref.c index b5f32fc4b..5f5642d14 100644 --- a/common/test/run-softref.c +++ b/common/test/run-softref.c @@ -41,9 +41,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -61,9 +58,6 @@ void fromwire_sha256(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct sh u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED, const u8 **cursor UNNEEDED, size_t *max UNNEEDED, size_t num UNNEEDED) { fprintf(stderr, "fromwire_tal_arrn called!\n"); abort(); } -/* Generated stub for fromwire_u16 */ -u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); } /* Generated stub for fromwire_u32 */ u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_u32 called!\n"); abort(); } @@ -79,9 +73,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } @@ -92,9 +83,6 @@ void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED, /* Generated stub for towire_sha256 */ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED) { fprintf(stderr, "towire_sha256 called!\n"); abort(); } -/* Generated stub for towire_u16 */ -void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED) -{ fprintf(stderr, "towire_u16 called!\n"); abort(); } /* Generated stub for towire_u32 */ void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED) { fprintf(stderr, "towire_u32 called!\n"); abort(); } diff --git a/common/test/run-sphinx-xor_cipher_stream.c b/common/test/run-sphinx-xor_cipher_stream.c index 963e4bda1..dc1bd585c 100644 --- a/common/test/run-sphinx-xor_cipher_stream.c +++ b/common/test/run-sphinx-xor_cipher_stream.c @@ -38,9 +38,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -108,9 +105,6 @@ void subkey_from_hmac(const char *prefix UNNEEDED, /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat 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(); } diff --git a/common/test/run-sphinx.c b/common/test/run-sphinx.c index 0145682d8..7cb201a8e 100644 --- a/common/test/run-sphinx.c +++ b/common/test/run-sphinx.c @@ -51,9 +51,6 @@ size_t bigsize_put(u8 buf[BIGSIZE_MAX_LEN] UNNEEDED, bigsize_t v UNNEEDED) /* Generated stub for fromwire_amount_msat */ struct amount_msat fromwire_amount_msat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_amount_msat called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat 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(); } @@ -72,9 +69,6 @@ bool tlv_fields_valid(const struct tlv_field *fields UNNEEDED, u64 *allow_extra /* Generated stub for towire_amount_msat */ void towire_amount_msat(u8 **pptr UNNEEDED, const struct amount_msat msat UNNEEDED) { fprintf(stderr, "towire_amount_msat called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat 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(); } diff --git a/common/test/run-wireaddr.c b/common/test/run-wireaddr.c index 42973fee8..3fc66fa03 100644 --- a/common/test/run-wireaddr.c +++ b/common/test/run-wireaddr.c @@ -45,9 +45,6 @@ char *b32_encode(const tal_t *ctx UNNEEDED, const void *data UNNEEDED, size_t le /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -83,9 +80,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/common/type_to_string.h b/common/type_to_string.h index c58e712da..171ac476a 100644 --- a/common/type_to_string.h +++ b/common/type_to_string.h @@ -15,8 +15,6 @@ union printable_types { const struct sha256 *sha256; const struct sha256_double *sha256_double; const struct ripemd160 *ripemd160; - const struct rel_locktime *rel_locktime; - const struct abs_locktime *abs_locktime; const struct bitcoin_tx *bitcoin_tx; const struct htlc *htlc; const struct preimage *preimage; diff --git a/connectd/test/run-initiator-success.c b/connectd/test/run-initiator-success.c index 627e0e241..27bb98bc9 100644 --- a/connectd/test/run-initiator-success.c +++ b/connectd/test/run-initiator-success.c @@ -48,9 +48,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -86,9 +83,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/connectd/test/run-responder-success.c b/connectd/test/run-responder-success.c index a531f19ca..1bf317e3f 100644 --- a/connectd/test/run-responder-success.c +++ b/connectd/test/run-responder-success.c @@ -48,9 +48,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -86,9 +83,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/connectd/test/run-websocket.c b/connectd/test/run-websocket.c index 8d50415bc..db4ff47eb 100644 --- a/connectd/test/run-websocket.c +++ b/connectd/test/run-websocket.c @@ -83,9 +83,6 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED) /* Generated stub for fromwire */ const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED) { fprintf(stderr, "fromwire called!\n"); abort(); } -/* Generated stub for fromwire_amount_sat */ -struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) -{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); } /* Generated stub for fromwire_bool */ bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED) { fprintf(stderr, "fromwire_bool called!\n"); abort(); } @@ -121,9 +118,6 @@ void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr /* Generated stub for towire */ void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED) { fprintf(stderr, "towire called!\n"); abort(); } -/* Generated stub for towire_amount_sat */ -void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED) -{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); } /* Generated stub for towire_bool */ void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED) { fprintf(stderr, "towire_bool called!\n"); abort(); } diff --git a/wire/test/Makefile b/wire/test/Makefile index d38fb9aad..adf452dbd 100644 --- a/wire/test/Makefile +++ b/wire/test/Makefile @@ -16,7 +16,7 @@ WIRE_TEST_COMMON_OBJS := \ common/utils.o # run-tlvstream.c needs to reach into bitcoin/pubkey for SUPERVERBOSE -$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o,$(BITCOIN_OBJS)) +$(WIRE_TEST_PROGRAMS): $(WIRE_TEST_COMMON_OBJS) $(filter-out bitcoin/pubkey.o bitcoin/chainparams.o,$(BITCOIN_OBJS)) # We put a dependency on non-exp sources here, so they get built even if # we're EXPERIMENTAL_FEATURES. diff --git a/wire/test/run-peer-wire.c b/wire/test/run-peer-wire.c index c6b025c41..8eb92aeb6 100644 --- a/wire/test/run-peer-wire.c +++ b/wire/test/run-peer-wire.c @@ -3,6 +3,7 @@ #include "../fromwire.c" #include "../peer_wire.c" #include "bitcoin/pubkey.c" +#include "bitcoin/chainparams.c" #include "common/amount.c" #include "common/channel_id.c" #include "common/node_id.c" @@ -1019,7 +1020,6 @@ int main(int argc, char *argv[]) void *ctx = tal(NULL, char); size_t i; u8 *msg; - const struct chainparams **chains; common_setup(argv[0]); @@ -1099,8 +1099,7 @@ int main(int argc, char *argv[]) assert(error_eq(&e, e2)); test_corruption(&e, e2, error); - chains = chainparams_for_networks(ctx); - for (i = 0; i < tal_count(chains); i++) { + for (i = 0; i < ARRAY_SIZE(networks); i++) { memset(&init, 2, sizeof(init)); init.globalfeatures = tal_arr(ctx, u8, 2); memset(init.globalfeatures, 2, 2); @@ -1108,7 +1107,7 @@ int main(int argc, char *argv[]) memset(init.localfeatures, 2, 2); init.tlvs = tlv_init_tlvs_new(ctx); init.tlvs->networks = tal_arr(init.tlvs, struct bitcoin_blkid, 1); - init.tlvs->networks[0] = chains[i]->genesis_blockhash; + init.tlvs->networks[0] = networks[i].genesis_blockhash; msg = towire_struct_init(ctx, &init); init2 = fromwire_struct_init(ctx, msg); assert(init_eq(&init, init2)); diff --git a/wire/test/run-tlvstream.c b/wire/test/run-tlvstream.c index 9fe2959d1..b658d85f8 100644 --- a/wire/test/run-tlvstream.c +++ b/wire/test/run-tlvstream.c @@ -22,6 +22,9 @@ static const char *reason; #include /* AUTOGENERATED MOCKS START */ +/* Generated stub for chainparams_by_chainhash */ +const struct chainparams *chainparams_by_chainhash(const struct bitcoin_blkid *chain_hash UNNEEDED) +{ fprintf(stderr, "chainparams_by_chainhash 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)