Makefile: create a library containing common, wire and bitcoin objects.
What changed, and why it matters
This commit is a build-system cleanup. It creates a new static library (libcommon.a) containing common, wire, and bitcoin object files so that Makefiles no longer need to list individual object files by hand. It also removes many auto-generated mock function stubs from unit tests because those functions are now provided by the library. There is no runtime behavior change to Core Lightning itself, and no security issue is introduced or fixed.
No security action required. Treat as ordinary build-system maintenance; verify CI still passes after the Makefile refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors the Core Lightning build system to archive common/, wire/, and bitcoin/ objects into libcommon.a and links most binaries and tests against that library instead of explicit per-target object lists. It reorders Makefile includes (wire before common), updates link rules to place non-external .a files at the end of the link line, deletes the accidental plugins/test/Makefile2, and regenerates unit-test mocks via update-mocks. No source-code logic changes are present.
Changed components
Makefilecommon/Makefilechanneld/Makefileclosingd/Makefileconnectd/Makefilegossipd/Makefilelightningd/Makefileonchaind/Makefileopeningd/Makefileplugins/Makefiledevtools/Makefilecli/Makefilehsmd/Makefilewallet/Makefiletests/fuzz/Makefileunit-test mock stubs across bitcoin, channeld, cli, closingd, common, connectd, gossipd, lightningd, onchaind, openingd, plugins, tools, wallet, wireInspect captured patch +431 / −4957
diff --git a/Makefile b/Makefile
index 8c81f55..f665f8a 100644
--- a/Makefile
+++ b/Makefile
@@ -370,8 +370,8 @@ endif
include external/Makefile
include bitcoin/Makefile
-include common/Makefile
include wire/Makefile
+include common/Makefile
include db/Makefile
include hsmd/Makefile
include gossipd/Makefile
@@ -698,9 +698,10 @@ $(ALL_TEST_PROGRAMS) $(ALL_FUZZ_TARGETS): %: %.o
# Without this rule, the (built-in) link line contains
# external/libwallycore.a directly, which causes a symbol clash (it
# uses some ccan modules internally). We want to rely on -lwallycore etc.
-# (as per EXTERNAL_LDLIBS) so we filter them out here.
+# (as per EXTERNAL_LDLIBS) so we filter them out here. We have to put the other
+# .a files (if any) at the end of the link line.
$(ALL_PROGRAMS) $(ALL_TEST_PROGRAMS):
- @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) libccan.a $($(@)_LDLIBS) -o $@)
+ @$(call VERBOSE, "ld $@", $(LINK.o) $(filter-out %.a,$^) $(filter-out external/%,$(filter %.a,$^)) $(LOADLIBES) $(EXTERNAL_LDLIBS) $(LDLIBS) $($(@)_LDLIBS) -o $@)
ifeq ($(OS),Darwin)
@$(call VERBOSE, "dsymutil $@", dsymutil $@)
endif
diff --git a/bitcoin/test/Makefile b/bitcoin/test/Makefile
index 7b15ab9..eadb3ed 100644
--- a/bitcoin/test/Makefile
+++ b/bitcoin/test/Makefile
@@ -2,10 +2,8 @@ BITCOIN_TEST_SRC := $(wildcard bitcoin/test/run-*.c)
BITCOIN_TEST_OBJS := $(BITCOIN_TEST_SRC:.c=.o)
BITCOIN_TEST_PROGRAMS := $(BITCOIN_TEST_OBJS:.o=)
-BITCOIN_TEST_COMMON_OBJS := common/utils.o common/setup.o common/autodata.o
-
-$(BITCOIN_TEST_PROGRAMS): $(BITCOIN_TEST_COMMON_OBJS) bitcoin/chainparams.o
-$(BITCOIN_TEST_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(BITCOIN_SRC)
+$(BITCOIN_TEST_PROGRAMS): bitcoin/chainparams.o libcommon.a
+$(BITCOIN_TEST_OBJS): $(BITCOIN_HEADERS) $(BITCOIN_SRC) bitcoin/test/Makefile
ALL_TEST_PROGRAMS += $(BITCOIN_TEST_PROGRAMS)
ALL_C_SOURCES += $(BITCOIN_TEST_PROGRAMS:=.c)
diff --git a/bitcoin/test/run-bitcoin_block_from_hex.c b/bitcoin/test/run-bitcoin_block_from_hex.c
index 5f6bb9b..0dc0bd6 100644
--- a/bitcoin/test/run-bitcoin_block_from_hex.c
+++ b/bitcoin/test/run-bitcoin_block_from_hex.c
@@ -10,93 +10,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 */
-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_fail */
-void *fromwire_fail(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_fail called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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_u32 */
-u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
-/* Generated stub for is_anchor_witness_script */
-bool is_anchor_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_anchor_witness_script called!\n"); abort(); }
-/* Generated stub for is_to_remote_anchored_witness_script */
-bool is_to_remote_anchored_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_to_remote_anchored_witness_script called!\n"); abort(); }
-/* Generated stub for pubkey_to_der */
-void pubkey_to_der(u8 der[PUBKEY_CMPR_LEN] UNNEEDED, const struct pubkey *key UNNEEDED)
-{ fprintf(stderr, "pubkey_to_der called!\n"); abort(); }
-/* Generated stub for pubkey_to_hash160 */
-void pubkey_to_hash160(const struct pubkey *pk UNNEEDED, struct ripemd160 *hash UNNEEDED)
-{ fprintf(stderr, "pubkey_to_hash160 called!\n"); abort(); }
-/* 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_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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_u32 */
-void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
-{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static const char block[] =
diff --git a/bitcoin/test/run-psbt-from-tx.c b/bitcoin/test/run-psbt-from-tx.c
index 2b55c42..5af07b3 100644
--- a/bitcoin/test/run-psbt-from-tx.c
+++ b/bitcoin/test/run-psbt-from-tx.c
@@ -9,77 +9,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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_sha256_double */
-void fromwire_sha256_double(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct sha256_double *sha256d UNNEEDED)
-{ fprintf(stderr, "fromwire_sha256_double called!\n"); abort(); }
-/* Generated stub for is_anchor_witness_script */
-bool is_anchor_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_anchor_witness_script called!\n"); abort(); }
-/* Generated stub for is_to_remote_anchored_witness_script */
-bool is_to_remote_anchored_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_to_remote_anchored_witness_script called!\n"); abort(); }
-/* Generated stub for pubkey_to_der */
-void pubkey_to_der(u8 der[PUBKEY_CMPR_LEN] UNNEEDED, const struct pubkey *key UNNEEDED)
-{ fprintf(stderr, "pubkey_to_der called!\n"); abort(); }
-/* Generated stub for pubkey_to_hash160 */
-void pubkey_to_hash160(const struct pubkey *pk UNNEEDED, struct ripemd160 *hash UNNEEDED)
-{ fprintf(stderr, "pubkey_to_hash160 called!\n"); abort(); }
-/* 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 sha256_double */
-void sha256_double(struct sha256_double *shadouble UNNEEDED, const void *p UNNEEDED, size_t len UNNEEDED)
-{ fprintf(stderr, "sha256_double called!\n"); abort(); }
-/* Generated stub for signature_from_der */
-bool signature_from_der(const u8 *der UNNEEDED, size_t len UNNEEDED, struct bitcoin_signature *sig UNNEEDED)
-{ fprintf(stderr, "signature_from_der called!\n"); abort(); }
-/* Generated stub for signature_to_der */
-size_t signature_to_der(u8 der[73] UNNEEDED, const struct bitcoin_signature *sig UNNEEDED)
-{ fprintf(stderr, "signature_to_der called!\n"); abort(); }
-/* Generated stub for towire_sha256_double */
-void towire_sha256_double(u8 **pptr UNNEEDED, const struct sha256_double *sha256d UNNEEDED)
-{ fprintf(stderr, "towire_sha256_double called!\n"); abort(); }
-/* Generated stub for varint_put */
-size_t varint_put(u8 buf[VARINT_MAX_LEN] UNNEEDED, varint_t v UNNEEDED)
-{ fprintf(stderr, "varint_put called!\n"); abort(); }
-/* Generated stub for varint_size */
-size_t varint_size(varint_t v UNNEEDED)
-{ fprintf(stderr, "varint_size called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* This transaction has scriptSig data in it.
diff --git a/bitcoin/test/run-secret_eq_consttime.c b/bitcoin/test/run-secret_eq_consttime.c
index 4f21ee1..6d4cb41 100644
--- a/bitcoin/test/run-secret_eq_consttime.c
+++ b/bitcoin/test/run-secret_eq_consttime.c
@@ -8,12 +8,6 @@
#include <unistd.h>
/* AUTOGENERATED MOCKS START */
-/* 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 towire */
-void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED)
-{ fprintf(stderr, "towire called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static bool verbose = false;
diff --git a/bitcoin/test/run-tx-bitcoin_tx_2of2_input_witness_weight.c b/bitcoin/test/run-tx-bitcoin_tx_2of2_input_witness_weight.c
index feb3817..47be0d7 100644
--- a/bitcoin/test/run-tx-bitcoin_tx_2of2_input_witness_weight.c
+++ b/bitcoin/test/run-tx-bitcoin_tx_2of2_input_witness_weight.c
@@ -13,116 +13,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 clone_psbt */
-struct wally_psbt *clone_psbt(const tal_t *ctx UNNEEDED, const struct wally_psbt *psbt UNNEEDED)
-{ fprintf(stderr, "clone_psbt called!\n"); abort(); }
-/* 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_fail */
-void *fromwire_fail(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_fail called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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_u32 */
-u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
-/* Generated stub for fromwire_wally_psbt */
-struct wally_psbt *fromwire_wally_psbt(const tal_t *ctx UNNEEDED,
- const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_wally_psbt called!\n"); abort(); }
-/* Generated stub for new_psbt */
-struct wally_psbt *new_psbt(const tal_t *ctx UNNEEDED,
- const struct wally_tx *wtx UNNEEDED)
-{ fprintf(stderr, "new_psbt called!\n"); abort(); }
-/* Generated stub for psbt_add_output */
-struct wally_psbt_output *psbt_add_output(struct wally_psbt *psbt UNNEEDED,
- struct wally_tx_output *output UNNEEDED,
- size_t insert_at UNNEEDED)
-{ fprintf(stderr, "psbt_add_output called!\n"); abort(); }
-/* Generated stub for psbt_append_input */
-struct wally_psbt_input *psbt_append_input(struct wally_psbt *psbt UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- u32 sequence UNNEEDED,
- const u8 *scriptSig UNNEEDED,
- const u8 *input_wscript UNNEEDED,
- const u8 *redeemscript UNNEEDED)
-{ fprintf(stderr, "psbt_append_input called!\n"); abort(); }
-/* Generated stub for psbt_final_tx */
-struct wally_tx *psbt_final_tx(const tal_t *ctx UNNEEDED, const struct wally_psbt *psbt UNNEEDED)
-{ fprintf(stderr, "psbt_final_tx called!\n"); abort(); }
-/* Generated stub for psbt_finalize */
-bool psbt_finalize(struct wally_psbt *psbt UNNEEDED)
-{ fprintf(stderr, "psbt_finalize called!\n"); abort(); }
-/* Generated stub for psbt_input_get_amount */
-struct amount_sat psbt_input_get_amount(const struct wally_psbt *psbt UNNEEDED,
- size_t in UNNEEDED)
-{ fprintf(stderr, "psbt_input_get_amount called!\n"); abort(); }
-/* Generated stub for psbt_input_set_wit_utxo */
-void psbt_input_set_wit_utxo(struct wally_psbt *psbt UNNEEDED, size_t in UNNEEDED,
- const u8 *scriptPubkey UNNEEDED, struct amount_sat amt UNNEEDED)
-{ fprintf(stderr, "psbt_input_set_wit_utxo 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_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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_u32 */
-void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
-{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
-/* Generated stub for towire_wally_psbt */
-void towire_wally_psbt(u8 **pptr UNNEEDED, const struct wally_psbt *psbt UNNEEDED)
-{ fprintf(stderr, "towire_wally_psbt called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, const char *argv[])
diff --git a/bitcoin/test/run-tx-encode.c b/bitcoin/test/run-tx-encode.c
index b28f319..404862f 100644
--- a/bitcoin/test/run-tx-encode.c
+++ b/bitcoin/test/run-tx-encode.c
@@ -11,93 +11,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 */
-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_fail */
-void *fromwire_fail(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_fail called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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_u32 */
-u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
-/* Generated stub for is_anchor_witness_script */
-bool is_anchor_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_anchor_witness_script called!\n"); abort(); }
-/* Generated stub for is_to_remote_anchored_witness_script */
-bool is_to_remote_anchored_witness_script(const u8 *script UNNEEDED, size_t script_len UNNEEDED)
-{ fprintf(stderr, "is_to_remote_anchored_witness_script called!\n"); abort(); }
-/* Generated stub for pubkey_to_der */
-void pubkey_to_der(u8 der[PUBKEY_CMPR_LEN] UNNEEDED, const struct pubkey *key UNNEEDED)
-{ fprintf(stderr, "pubkey_to_der called!\n"); abort(); }
-/* Generated stub for pubkey_to_hash160 */
-void pubkey_to_hash160(const struct pubkey *pk UNNEEDED, struct ripemd160 *hash UNNEEDED)
-{ fprintf(stderr, "pubkey_to_hash160 called!\n"); abort(); }
-/* 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_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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_u32 */
-void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
-{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
const char extended_tx[] =
diff --git a/channeld/Makefile b/channeld/Makefile
index 7edcd46..a2c11e8 100644
--- a/channeld/Makefile
+++ b/channeld/Makefile
@@ -34,73 +34,9 @@ LIGHTNINGD_CONTROL_OBJS += \
channeld/channeld_wiregen.o \
channeld/inflight.o
-
-# Common source we use.
-CHANNELD_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bigsize.o \
- common/billboard.o \
- common/bip32.o \
- common/blinding.o \
- common/blockheight_states.o \
- common/channel_config.o \
- common/channel_id.o \
- common/channel_type.o \
- common/cryptomsg.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/derive_basepoints.o \
- common/ecdh_hsmd.o \
- common/features.o \
- common/fee_states.o \
- common/peer_io.o \
- common/peer_status_wiregen.o \
- common/status_wiregen.o \
- common/gossip_store.o \
- common/hmac.o \
- common/hsm_capable.o \
- common/interactivetx.o \
- common/htlc_state.o \
- common/htlc_trim.o \
- common/htlc_tx.o \
- common/htlc_wire.o \
- common/initial_channel.o \
- common/initial_commit_tx.o \
- common/keyset.o \
- common/key_derive.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/peer_billboard.o \
- common/peer_failed.o \
- common/penalty_base.o \
- common/per_peer_state.o \
- common/permute_tx.o \
- common/ping.o \
- common/psbt_keypath.o \
- common/psbt_open.o \
- common/psbt_internal.o \
- common/pseudorand.o \
- common/read_peer_msg.o \
- common/setup.o \
- common/status.o \
- common/status_wire.o \
- common/subdaemon.o \
- common/timeout.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wire_error.o \
- common/wireaddr.o \
- wire/fromwire.o \
- wire/towire.o
-
channeld/full_channel_error_names_gen.h: channeld/full_channel_error.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr channeld/full_channel_error.h > $@
-lightningd/lightning_channeld: $(CHANNELD_OBJS) $(CHANNELD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
+lightningd/lightning_channeld: $(CHANNELD_OBJS) $(HSMD_CLIENT_OBJS) libcommon.a
include channeld/test/Makefile
diff --git a/channeld/test/Makefile b/channeld/test/Makefile
index 67bc5a7..0bb50c4 100644
--- a/channeld/test/Makefile
+++ b/channeld/test/Makefile
@@ -7,7 +7,13 @@ CHANNELD_TEST_PROGRAMS := $(CHANNELD_TEST_OBJS:.o=)
ALL_C_SOURCES += $(CHANNELD_TEST_SRC)
ALL_TEST_PROGRAMS += $(CHANNELD_TEST_PROGRAMS)
-CHANNELD_TEST_COMMON_OBJS := \
+# run-full_channel.o needs a special version of some common files!
+$(filter-out channeld/test/run-full_channel,$(CHANNELD_TEST_PROGRAMS)): libcommon.a
+
+channeld/test/run-full_channel: \
+ $(BITCOIN_OBJS) \
+ wire/towire.o \
+ wire/fromwire.o \
common/amount.o \
common/autodata.o \
common/channel_type.o \
@@ -24,8 +30,6 @@ CHANNELD_TEST_COMMON_OBJS := \
common/setup.o \
common/utils.o
-$(CHANNELD_TEST_PROGRAMS): $(BITCOIN_OBJS) $(WIRE_OBJS) $(CHANNELD_TEST_COMMON_OBJS)
-
-$(CHANNELD_TEST_OBJS): $(CHANNELD_HEADERS) $(CHANNELD_SRC)
+$(CHANNELD_TEST_OBJS): $(CHANNELD_HEADERS) $(CHANNELD_SRC) channeld/test/Makefile
check-units: $(CHANNELD_TEST_PROGRAMS:%=unittest/%)
diff --git a/channeld/test/run-commit_tx.c b/channeld/test/run-commit_tx.c
index 5f0a636..f2e0c8d 100644
--- a/channeld/test/run-commit_tx.c
+++ b/channeld/test/run-commit_tx.c
@@ -22,37 +22,6 @@ static bool print_superverbose;
/*#define DEBUG */
/* AUTOGENERATED MOCKS START */
-/* Generated stub for fromwire_bigsize */
-bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
-/* Generated stub for status_fmt */
-void status_fmt(enum log_level level UNNEEDED,
- const struct node_id *peer UNNEEDED,
- const char *fmt UNNEEDED, ...)
-
-{ fprintf(stderr, "status_fmt 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* bitcoind loves its backwards txids! */
diff --git a/channeld/test/run-full_channel.c b/channeld/test/run-full_channel.c
index 6912801..a852d19 100644
--- a/channeld/test/run-full_channel.c
+++ b/channeld/test/run-full_channel.c
@@ -9,25 +9,32 @@
#include "../full_channel.c"
#include "../commit_tx.c"
#include <ccan/err/err.h>
+#include <ccan/io/io.h>
#include <common/daemon.h>
#include <common/setup.h>
+#include <wire/wire_io.h>
+#include <wire/wire_sync.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for fromwire_bigsize */
-bigsize_t fromwire_bigsize(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bigsize called!\n"); abort(); }
-/* Generated stub for fromwire_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 io_read_wire_ */
+struct io_plan *io_read_wire_(struct io_conn *conn UNNEEDED,
+ const tal_t *ctx UNNEEDED,
+ u8 **data UNNEEDED,
+ struct io_plan *(*next)(struct io_conn * UNNEEDED, void *) UNNEEDED,
+ void *next_arg UNNEEDED)
+{ fprintf(stderr, "io_read_wire_ called!\n"); abort(); }
+/* Generated stub for io_write_wire_ */
+struct io_plan *io_write_wire_(struct io_conn *conn UNNEEDED,
+ const u8 *data TAKES UNNEEDED,
+ struct io_plan *(*next)(struct io_conn * UNNEEDED, void *) UNNEEDED,
+ void *next_arg UNNEEDED)
+{ fprintf(stderr, "io_write_wire_ called!\n"); abort(); }
/* Generated stub for memleak_add_helper_ */
void memleak_add_helper_(const tal_t *p UNNEEDED, void (*cb)(struct htable *memtable UNNEEDED,
const tal_t *)){ }
/* Generated stub for memleak_scan_htable */
void memleak_scan_htable(struct htable *memtable UNNEEDED, const struct htable *ht UNNEEDED)
{ fprintf(stderr, "memleak_scan_htable called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
/* Generated stub for send_backtrace */
void send_backtrace(const char *why UNNEEDED)
{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
@@ -35,12 +42,9 @@ void send_backtrace(const char *why UNNEEDED)
void status_failed(enum status_failreason code UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "status_failed 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
+/* Generated stub for wire_sync_write */
+bool wire_sync_write(int fd UNNEEDED, const void *msg TAKES UNNEEDED)
+{ fprintf(stderr, "wire_sync_write called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
void status_fmt(enum log_level level UNUSED,
diff --git a/cli/Makefile b/cli/Makefile
index 82dea90..3c83e78 100644
--- a/cli/Makefile
+++ b/cli/Makefile
@@ -5,17 +5,8 @@ ALL_C_SOURCES += $(LIGHTNING_CLI_SRC)
ALL_C_HEADERS +=
ALL_PROGRAMS += cli/lightning-cli
-LIGHTNING_CLI_COMMON_OBJS := \
- bitcoin/chainparams.o \
- common/configdir.o \
- common/configvar.o \
- common/json_parse_simple.o \
- common/status_levels.o \
- common/utils.o \
- common/version.o
-
$(LIGHTNING_CLI_OBJS): $(JSMN_HEADERS) $(COMMON_HEADERS) $(CCAN_HEADERS)
-cli/lightning-cli: $(LIGHTNING_CLI_OBJS) $(LIGHTNING_CLI_COMMON_OBJS) $(JSMN_OBJS) libccan.a
+cli/lightning-cli: $(LIGHTNING_CLI_OBJS) $(JSMN_OBJS) libcommon.a libccan.a
include cli/test/Makefile
diff --git a/cli/test/Makefile b/cli/test/Makefile
index 6f9c9be..d6dcffb 100644
--- a/cli/test/Makefile
+++ b/cli/test/Makefile
@@ -7,23 +7,8 @@ CLI_TEST_PROGRAMS := $(CLI_TEST_OBJS:.o=)
ALL_C_SOURCES += $(CLI_TEST_SRC)
ALL_TEST_PROGRAMS += $(CLI_TEST_PROGRAMS)
-CLI_TEST_COMMON_OBJS := \
- common/autodata.o \
- common/configdir.o \
- common/configvar.o \
- common/daemon_conn.o \
- common/htlc_state.o \
- common/json_parse_simple.o \
- common/pseudorand.o \
- common/memleak.o \
- common/msg_queue.o \
- common/setup.o \
- common/utils.o \
- common/version.o \
- common/permute_tx.o
+$(CLI_TEST_PROGRAMS): libcommon.a
-$(CLI_TEST_PROGRAMS): libccan.a $(BITCOIN_OBJS) $(WIRE_OBJS) $(CLI_TEST_COMMON_OBJS)
-
-$(CLI_TEST_OBJS): $(LIGHTNING_CLI_HEADERS) $(LIGHTNING_CLI_SRC)
+$(CLI_TEST_OBJS): $(LIGHTNING_CLI_HEADERS) $(LIGHTNING_CLI_SRC) cli/test/Makefile
check-units: $(CLI_TEST_PROGRAMS:%=unittest/%)
diff --git a/cli/test/run-human-mode.c b/cli/test/run-human-mode.c
index 4f2af64..c90c4d8 100644
--- a/cli/test/run-human-mode.c
+++ b/cli/test/run-human-mode.c
@@ -33,84 +33,6 @@ int test_chdir(const char *path);
#undef main
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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_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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
-/* Generated stub for log_level_parse */
-bool log_level_parse(const char *levelstr UNNEEDED, size_t len UNNEEDED,
- enum log_level *level UNNEEDED)
-{ fprintf(stderr, "log_level_parse called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
-/* 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(); }
-/* 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int test_socket(int domain UNUSED, int type UNUSED, int protocol UNUSED)
diff --git a/cli/test/run-large-input.c b/cli/test/run-large-input.c
index 3b8742d..c1dc929 100644
--- a/cli/test/run-large-input.c
+++ b/cli/test/run-large-input.c
@@ -33,84 +33,6 @@ int test_chdir(const char *path);
#undef main
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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_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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
-/* Generated stub for log_level_parse */
-bool log_level_parse(const char *levelstr UNNEEDED, size_t len UNNEEDED,
- enum log_level *level UNNEEDED)
-{ fprintf(stderr, "log_level_parse called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
-/* 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(); }
-/* 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int test_socket(int domain UNUSED, int type UNUSED, int protocol UNUSED)
diff --git a/cli/test/run-remove-hint.c b/cli/test/run-remove-hint.c
index 908621d..7cf8baf 100644
--- a/cli/test/run-remove-hint.c
+++ b/cli/test/run-remove-hint.c
@@ -36,84 +36,6 @@ int test_chdir(const char *path);
#undef main
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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_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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
-/* Generated stub for log_level_parse */
-bool log_level_parse(const char *levelstr UNNEEDED, size_t len UNNEEDED,
- enum log_level *level UNNEEDED)
-{ fprintf(stderr, "log_level_parse called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
-/* 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(); }
-/* 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int test_socket(int domain UNUSED, int type UNUSED, int protocol UNUSED)
diff --git a/closingd/Makefile b/closingd/Makefile
index 1c3953c..4d961d2 100644
--- a/closingd/Makefile
+++ b/closingd/Makefile
@@ -17,48 +17,6 @@ ALL_PROGRAMS += lightningd/lightning_closingd
LIGHTNINGD_CONTROL_HEADERS += closingd/closingd_wiregen.h
LIGHTNINGD_CONTROL_OBJS += closingd/closingd_wiregen.o
-# Common source we use.
-CLOSINGD_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bigsize.o \
- common/bip32.o \
- common/channel_id.o \
- common/close_tx.o \
- common/cryptomsg.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/derive_basepoints.o \
- common/gossip_store.o \
- common/htlc_wire.o \
- common/key_derive.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/peer_billboard.o \
- common/peer_failed.o \
- common/peer_io.o \
- common/peer_status_wiregen.o \
- common/per_peer_state.o \
- common/permute_tx.o \
- common/ping.o \
- common/psbt_keypath.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/status_wiregen.o \
- common/read_peer_msg.o \
- common/setup.o \
- common/status.o \
- common/status_wire.o \
- common/subdaemon.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wire_error.o \
- common/wireaddr.o
-
-lightningd/lightning_closingd: $(CLOSINGD_OBJS) $(CLOSINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
+lightningd/lightning_closingd: $(CLOSINGD_OBJS) $(HSMD_CLIENT_OBJS) libcommon.a
-include closingd/test/Makefile
diff --git a/common/Makefile b/common/Makefile
index dec98e0..8348611 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -144,6 +144,10 @@ $(COMMON_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(EXTERNAL_HEADERS) $(COMMON_
# Only common/version.c can include this header.
common/version.o: version_gen.h
+# We make a static library, this way linker can discard unused parts.
+libcommon.a: $(COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS)
+ @$(call VERBOSE, "ar $@", $(AR) r $@ $?)
+
ALL_C_HEADERS += $(COMMON_HEADERS)
ALL_C_SOURCES += $(COMMON_SRC)
@@ -158,6 +162,7 @@ check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=ch
clean: common-clean
common-clean:
+ $(RM) libcommon.a
$(RM) common/gen*
include common/test/Makefile
diff --git a/common/test/Makefile b/common/test/Makefile
index db0fbca..5c57de9 100644
--- a/common/test/Makefile
+++ b/common/test/Makefile
@@ -9,7 +9,7 @@ COMMON_TEST_COMMON_OBJS := \
common/utils.o
$(COMMON_TEST_PROGRAMS): $(COMMON_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
-$(COMMON_TEST_OBJS): $(COMMON_HEADERS) $(WIRE_HEADERS) $(COMMON_SRC)
+$(COMMON_TEST_OBJS): $(COMMON_HEADERS) $(WIRE_HEADERS) $(COMMON_SRC) common/test/Makefile
ALL_C_SOURCES += $(COMMON_TEST_SRC)
ALL_TEST_PROGRAMS += $(COMMON_TEST_PROGRAMS)
diff --git a/connectd/Makefile b/connectd/Makefile
index 781172e..33e6e8b 100644
--- a/connectd/Makefile
+++ b/connectd/Makefile
@@ -35,61 +35,8 @@ ALL_PROGRAMS += lightningd/lightning_websocketd
LIGHTNINGD_CONTROL_HEADERS += connectd/connectd_wiregen.h
LIGHTNINGD_CONTROL_OBJS += connectd/connectd_wiregen.o
-# Common source we use.
-CONNECTD_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/base64.o \
- common/bech32.o \
- common/bech32_util.o \
- common/bigsize.o \
- common/bip32.o \
- common/blinding.o \
- common/blindedpath.o \
- common/channel_id.o \
- common/cryptomsg.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/decode_array.o \
- common/derive_basepoints.o \
- common/dev_disconnect.o \
- common/ecdh_hsmd.o \
- common/features.o \
- common/fp16.o \
- common/hmac.o \
- common/status_wiregen.o \
- common/gossip_store.o \
- common/gossmap.o \
- common/key_derive.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onion_decode.o \
- common/onionreply.o \
- common/onion_message_parse.o \
- common/ping.o \
- common/per_peer_state.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/sciddir_or_pubkey.o \
- common/setup.o \
- common/sphinx.o \
- common/status.o \
- common/status_wire.o \
- common/subdaemon.o \
- common/timeout.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wireaddr.o \
- common/wire_error.o \
- gossipd/gossipd_wiregen.o \
- gossipd/gossip_store_wiregen.o \
- wire/onion_wiregen.o
+lightningd/lightning_connectd: $(CONNECTD_OBJS) $(HSMD_CLIENT_OBJS) gossipd/gossipd_wiregen.o gossipd/gossip_store_wiregen.o libcommon.a
-lightningd/lightning_connectd: $(CONNECTD_OBJS) $(CONNECTD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(HSMD_CLIENT_OBJS)
-
-lightningd/lightning_websocketd: $(WEBSOCKETD_OBJS) common/setup.o common/utils.o common/autodata.o
+lightningd/lightning_websocketd: $(WEBSOCKETD_OBJS) libcommon.a
include connectd/test/Makefile
diff --git a/connectd/test/Makefile b/connectd/test/Makefile
index c624f32..3bdb1c3 100644
--- a/connectd/test/Makefile
+++ b/connectd/test/Makefile
@@ -4,20 +4,13 @@ CONNECTD_TEST_SRC := $(wildcard connectd/test/run-*.c)
CONNECTD_TEST_OBJS := $(CONNECTD_TEST_SRC:.c=.o)
CONNECTD_TEST_PROGRAMS := $(CONNECTD_TEST_OBJS:.o=)
-CONNECTD_TEST_COMMON_OBJS := \
- common/autodata.o \
- common/features.o \
- common/pseudorand.o \
- common/setup.o \
- common/utils.o
-
ALL_C_SOURCES += $(CONNECTD_TEST_SRC)
ALL_TEST_PROGRAMS += $(CONNECTD_TEST_PROGRAMS)
-$(CONNECTD_TEST_PROGRAMS): $(CONNECTD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
+$(CONNECTD_TEST_PROGRAMS): libcommon.a
# Test objects depend on ../ src and headers.
-$(CONNECTD_TEST_OBJS): $(CONNECTD_HEADERS) $(CONNECTD_SRC) $(WEBSOCKETD_HEADERS) $(WEBSOCKETD_SRC)
+$(CONNECTD_TEST_OBJS): $(CONNECTD_HEADERS) $(CONNECTD_SRC) $(WEBSOCKETD_HEADERS) $(WEBSOCKETD_SRC) connectd/test/Makefile
check-units: $(CONNECTD_TEST_PROGRAMS:%=unittest/%)
diff --git a/connectd/test/run-crc32_of_update.c b/connectd/test/run-crc32_of_update.c
index efcaaf4..4555c12 100644
--- a/connectd/test/run-crc32_of_update.c
+++ b/connectd/test/run-crc32_of_update.c
@@ -12,215 +12,15 @@ int unused_main(int argc, char *argv[]);
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 bigsize_len */
-size_t bigsize_len(bigsize_t v UNNEEDED)
-{ fprintf(stderr, "bigsize_len called!\n"); abort(); }
-/* Generated stub for decode_scid_query_flags */
-bigsize_t *decode_scid_query_flags(const tal_t *ctx UNNEEDED,
- const struct tlv_query_short_channel_ids_tlvs_query_flags *qf UNNEEDED)
-{ fprintf(stderr, "decode_scid_query_flags called!\n"); abort(); }
-/* Generated stub for decode_short_ids */
-struct short_channel_id *decode_short_ids(const tal_t *ctx UNNEEDED, const u8 *encoded UNNEEDED)
-{ fprintf(stderr, "decode_short_ids called!\n"); abort(); }
-/* 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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool called!\n"); abort(); }
/* Generated stub for fromwire_connectd_dev_set_max_scids_encode_size */
bool fromwire_connectd_dev_set_max_scids_encode_size(const void *p UNNEEDED, u32 *max UNNEEDED)
{ fprintf(stderr, "fromwire_connectd_dev_set_max_scids_encode_size 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_query_channel_range */
-bool fromwire_query_channel_range(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct bitcoin_blkid *chain_hash UNNEEDED, u32 *first_blocknum UNNEEDED, u32 *number_of_blocks UNNEEDED, struct tlv_query_channel_range_tlvs **tlvs UNNEEDED)
-{ fprintf(stderr, "fromwire_query_channel_range called!\n"); abort(); }
-/* Generated stub for fromwire_query_short_channel_ids */
-bool fromwire_query_short_channel_ids(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct bitcoin_blkid *chain_hash UNNEEDED, u8 **encoded_short_ids UNNEEDED, struct tlv_query_short_channel_ids_tlvs **tlvs UNNEEDED)
-{ fprintf(stderr, "fromwire_query_short_channel_ids called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
/* Generated stub for get_gossmap */
struct gossmap *get_gossmap(struct daemon *daemon UNNEEDED)
{ fprintf(stderr, "get_gossmap called!\n"); abort(); }
-/* Generated stub for gossmap_chan_byidx */
-struct gossmap_chan *gossmap_chan_byidx(const struct gossmap *map UNNEEDED, u32 idx UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_byidx called!\n"); abort(); }
-/* Generated stub for gossmap_chan_get_announce */
-u8 *gossmap_chan_get_announce(const tal_t *ctx UNNEEDED,
- const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *c UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_get_announce called!\n"); abort(); }
-/* Generated stub for gossmap_chan_get_update */
-u8 *gossmap_chan_get_update(const tal_t *ctx UNNEEDED,
- const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *chan UNNEEDED,
- int dir UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_get_update called!\n"); abort(); }
-/* Generated stub for gossmap_chan_get_update_details */
-void gossmap_chan_get_update_details(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *chan UNNEEDED,
- int dir UNNEEDED,
- u32 *timestamp UNNEEDED,
- u8 *message_flags UNNEEDED,
- u8 *channel_flags UNNEEDED,
- u16 *cltv_expiry_delta UNNEEDED,
- u32 *fee_base_msat UNNEEDED,
- u32 *fee_proportional_millionths UNNEEDED,
- struct amount_msat *htlc_minimum_msat UNNEEDED,
- struct amount_msat *htlc_maximum_msat UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_get_update_details called!\n"); abort(); }
-/* Generated stub for gossmap_chan_scid */
-struct short_channel_id gossmap_chan_scid(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *c UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_scid called!\n"); abort(); }
-/* Generated stub for gossmap_find_chan */
-struct gossmap_chan *gossmap_find_chan(const struct gossmap *map UNNEEDED,
- const struct short_channel_id *scid UNNEEDED)
-{ fprintf(stderr, "gossmap_find_chan called!\n"); abort(); }
-/* Generated stub for gossmap_find_node */
-struct gossmap_node *gossmap_find_node(const struct gossmap *map UNNEEDED,
- const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "gossmap_find_node called!\n"); abort(); }
-/* Generated stub for gossmap_max_chan_idx */
-u32 gossmap_max_chan_idx(const struct gossmap *map UNNEEDED)
-{ fprintf(stderr, "gossmap_max_chan_idx called!\n"); abort(); }
-/* Generated stub for gossmap_node_get_announce */
-u8 *gossmap_node_get_announce(const tal_t *ctx UNNEEDED,
- const struct gossmap *map UNNEEDED,
- const struct gossmap_node *n UNNEEDED)
-{ fprintf(stderr, "gossmap_node_get_announce called!\n"); abort(); }
-/* Generated stub for gossmap_node_get_id */
-void gossmap_node_get_id(const struct gossmap *map UNNEEDED,
- const struct gossmap_node *node UNNEEDED,
- struct node_id *id UNNEEDED)
-{ fprintf(stderr, "gossmap_node_get_id called!\n"); abort(); }
-/* Generated stub for gossmap_nth_node */
-struct gossmap_node *gossmap_nth_node(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *chan UNNEEDED,
- int n UNNEEDED)
-{ fprintf(stderr, "gossmap_nth_node called!\n"); abort(); }
/* Generated stub for inject_peer_msg */
void inject_peer_msg(struct peer *peer UNNEEDED, const u8 *msg TAKES UNNEEDED)
{ fprintf(stderr, "inject_peer_msg called!\n"); abort(); }
-/* Generated stub for master_badmsg */
-void master_badmsg(u32 type_expected UNNEEDED, const u8 *msg)
-{ fprintf(stderr, "master_badmsg called!\n"); abort(); }
-/* Generated stub for node_id_cmp */
-int node_id_cmp(const struct node_id *a UNNEEDED, const struct node_id *b UNNEEDED)
-{ fprintf(stderr, "node_id_cmp called!\n"); abort(); }
-/* Generated stub for status_fmt */
-void status_fmt(enum log_level level UNNEEDED,
- const struct node_id *peer UNNEEDED,
- const char *fmt UNNEEDED, ...)
-
-{ fprintf(stderr, "status_fmt called!\n"); abort(); }
-/* Generated stub for tlv_reply_channel_range_tlvs_new */
-struct tlv_reply_channel_range_tlvs *tlv_reply_channel_range_tlvs_new(const tal_t *ctx UNNEEDED)
-{ fprintf(stderr, "tlv_reply_channel_range_tlvs_new 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_channel_update_timestamps */
-void towire_channel_update_timestamps(u8 **p UNNEEDED, const struct channel_update_timestamps *channel_update_timestamps UNNEEDED)
-{ fprintf(stderr, "towire_channel_update_timestamps called!\n"); abort(); }
-/* Generated stub for towire_reply_channel_range */
-u8 *towire_reply_channel_range(const tal_t *ctx UNNEEDED, const struct bitcoin_blkid *chain_hash UNNEEDED, u32 first_blocknum UNNEEDED, u32 number_of_blocks UNNEEDED, u8 sync_complete UNNEEDED, const u8 *encoded_short_ids UNNEEDED, const struct tlv_reply_channel_range_tlvs *tlvs UNNEEDED)
-{ fprintf(stderr, "towire_reply_channel_range called!\n"); abort(); }
-/* Generated stub for towire_reply_short_channel_ids_end */
-u8 *towire_reply_short_channel_ids_end(const tal_t *ctx UNNEEDED, const struct bitcoin_blkid *chain_hash UNNEEDED, u8 full_information UNNEEDED)
-{ fprintf(stderr, "towire_reply_short_channel_ids_end called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
-/* Generated stub for towire_warningfmtv */
-u8 *towire_warningfmtv(const tal_t *ctx UNNEEDED,
- const struct channel_id *channel UNNEEDED,
- const char *fmt UNNEEDED,
- va_list ap UNNEEDED)
-{ fprintf(stderr, "towire_warningfmtv called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/connectd/test/run-gossip_rcvd_filter.c b/connectd/test/run-gossip_rcvd_filter.c
index ef20a1c..b46dc4c 100644
--- a/connectd/test/run-gossip_rcvd_filter.c
+++ b/connectd/test/run-gossip_rcvd_filter.c
@@ -6,68 +6,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 towire */
-void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED)
-{ fprintf(stderr, "towire called!\n"); abort(); }
-/* Generated stub for towire_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
void memleak_add_helper_(const tal_t *p UNNEEDED,
diff --git a/connectd/test/run-initiator-success.c b/connectd/test/run-initiator-success.c
index 26aeb40..c083571 100644
--- a/connectd/test/run-initiator-success.c
+++ b/connectd/test/run-initiator-success.c
@@ -14,103 +14,6 @@
#include <wire/wire.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 */
-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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool 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_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* No randomness please, we want to replicate test vectors. */
diff --git a/connectd/test/run-netaddress.c b/connectd/test/run-netaddress.c
index c69ed25..889ef88 100644
--- a/connectd/test/run-netaddress.c
+++ b/connectd/test/run-netaddress.c
@@ -13,145 +13,6 @@
#define DEFAULT_PORT 9735
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 b32_decode */
-u8 *b32_decode(const tal_t *ctx UNNEEDED, const char *str UNNEEDED, size_t len UNNEEDED)
-{ fprintf(stderr, "b32_decode called!\n"); abort(); }
-/* Generated stub for b32_encode */
-char *b32_encode(const tal_t *ctx UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED)
-{ fprintf(stderr, "b32_encode called!\n"); abort(); }
-/* Generated stub for daemon_conn_send */
-void daemon_conn_send(struct daemon_conn *dc UNNEEDED, const u8 *msg UNNEEDED)
-{ fprintf(stderr, "daemon_conn_send called!\n"); abort(); }
-/* Generated stub for daemon_conn_sync_flush */
-bool daemon_conn_sync_flush(struct daemon_conn *dc UNNEEDED)
-{ fprintf(stderr, "daemon_conn_sync_flush called!\n"); abort(); }
-/* 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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool 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_peektype */
-int fromwire_peektype(const u8 *cursor UNNEEDED)
-{ fprintf(stderr, "fromwire_peektype called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
-/* Generated stub for is_msg_for_gossipd */
-bool is_msg_for_gossipd(const u8 *cursor UNNEEDED)
-{ fprintf(stderr, "is_msg_for_gossipd called!\n"); abort(); }
-/* Generated stub for peer_wire_name */
-const char *peer_wire_name(int e UNNEEDED)
-{ fprintf(stderr, "peer_wire_name called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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_status_fail */
-u8 *towire_status_fail(const tal_t *ctx UNNEEDED, enum status_failreason failreason UNNEEDED, const wirestring *desc UNNEEDED)
-{ fprintf(stderr, "towire_status_fail called!\n"); abort(); }
-/* Generated stub for towire_status_io */
-u8 *towire_status_io(const tal_t *ctx UNNEEDED, enum log_level iodir UNNEEDED, const struct node_id *peer UNNEEDED, const wirestring *who UNNEEDED, const u8 *data UNNEEDED)
-{ fprintf(stderr, "towire_status_io called!\n"); abort(); }
-/* Generated stub for towire_status_log */
-u8 *towire_status_log(const tal_t *ctx UNNEEDED, enum log_level level UNNEEDED, const struct node_id *peer UNNEEDED, const wirestring *entry UNNEEDED)
-{ fprintf(stderr, "towire_status_log called!\n"); abort(); }
-/* Generated stub for towire_status_version */
-u8 *towire_status_version(const tal_t *ctx UNNEEDED, const wirestring *version UNNEEDED)
-{ fprintf(stderr, "towire_status_version 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
-/* Generated stub for version */
-const char *version(void)
-{ fprintf(stderr, "version called!\n"); abort(); }
-/* Generated stub for wire_sync_write */
-bool wire_sync_write(int fd UNNEEDED, const void *msg TAKES UNNEEDED)
-{ fprintf(stderr, "wire_sync_write called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/connectd/test/run-responder-success.c b/connectd/test/run-responder-success.c
index ed1dfb1..881c63c 100644
--- a/connectd/test/run-responder-success.c
+++ b/connectd/test/run-responder-success.c
@@ -14,103 +14,6 @@
#include <wire/wire.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 */
-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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool 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_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
/* No randomness please, we want to replicate test vectors. */
diff --git a/connectd/test/run-websocket.c b/connectd/test/run-websocket.c
index 25f126e..809618d 100644
--- a/connectd/test/run-websocket.c
+++ b/connectd/test/run-websocket.c
@@ -49,103 +49,6 @@ int websocket_main(int argc, char *argv[]);
#undef main
/* AUTOGENERATED MOCKS START */
-/* Generated stub for amount_asset_is_main */
-bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
-/* Generated stub for amount_asset_to_sat */
-struct amount_sat amount_asset_to_sat(struct amount_asset *asset UNNEEDED)
-{ fprintf(stderr, "amount_asset_to_sat called!\n"); abort(); }
-/* Generated stub for amount_feerate */
- bool amount_feerate(u32 *feerate UNNEEDED, struct amount_sat fee UNNEEDED, size_t weight UNNEEDED)
-{ fprintf(stderr, "amount_feerate called!\n"); abort(); }
-/* Generated stub for amount_sat */
-struct amount_sat amount_sat(u64 satoshis UNNEEDED)
-{ fprintf(stderr, "amount_sat called!\n"); abort(); }
-/* Generated stub for amount_sat_add */
- bool amount_sat_add(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_add called!\n"); abort(); }
-/* Generated stub for amount_sat_eq */
-bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_greater_eq */
-bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_greater_eq called!\n"); abort(); }
-/* Generated stub for amount_sat_sub */
- bool amount_sat_sub(struct amount_sat *val UNNEEDED,
- struct amount_sat a UNNEEDED,
- struct amount_sat b UNNEEDED)
-{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
-/* Generated stub for amount_sat_to_asset */
-struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
-{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
-/* 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 */
-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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool 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_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/devtools/Makefile b/devtools/Makefile
index 6062791..a61f3c3 100644
--- a/devtools/Makefile
+++ b/devtools/Makefile
@@ -16,94 +16,20 @@ ifeq ($(HAVE_ZLIB),1)
devtools/gossmap-compress_LDLIBS=-lz
endif # ZLIB
-DEVTOOLS_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/blinding.o \
- common/blindedpath.o \
- common/coin_mvt.o \
- common/base32.o \
- common/bech32.o \
- common/bech32_util.o \
- common/bigsize.o \
- common/bolt11.o \
- common/blockheight_states.o \
- common/channel_id.o \
- common/decode_array.o \
- common/features.o \
- common/fee_states.o \
- common/hash_u5.o \
- common/hmac.o \
- common/htlc_state.o \
- common/json_parse.o \
- common/json_parse_simple.o \
- common/memleak.o \
- common/node_id.o \
- common/per_peer_state.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/sciddir_or_pubkey.o \
- common/setup.o \
- common/utils.o \
- common/version.o \
- common/wireaddr.o \
- wire/onion_wiregen.o \
- wire/peer_wiregen.o \
- wire/channel_type_wiregen.o \
- wire/tlvstream.o
+$(DEVTOOLS): %: %.o libcommon.a
+$(DEVTOOLS_TOOL_OBJS): wire/wire.h
-devtools/features: common/features.o common/utils.o wire/fromwire.o wire/towire.o devtools/features.o
+# Some devtools require extra objects
+DEVTOOLS_NEEDS_GOSSIP_STORE := devtools/gossmap-compress devtools/dump-gossipstore devtools/convert-gossmap devtools/create-gossipstore
-devtools/rune: common/utils.o common/autodata.o common/setup.o common/version.o wire/fromwire.o wire/towire.o devtools/rune.o
+$(DEVTOOLS_NEEDS_GOSSIP_STORE): gossipd/gossip_store_wiregen.o
+$(DEVTOOLS_NEEDS_GOSSIP_STORE:=.o): gossipd/gossip_store_wiregen.h
-devtools/fp16: common/fp16.o common/utils.o common/setup.o common/autodata.o devtools/fp16.o
+devtools/decodemsg: devtools/print_wire.o
+devtools/decodemsg.o: devtools/print_wire.h
-devtools/bolt11-cli: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bolt11-cli.o
+devtools/mkcommit: channeld/full_channel.o channeld/commit_tx.o
+devtools/mkcommit.o: channeld/full_channel.h channeld/commit_tx.h
-devtools/encodeaddr: common/utils.o common/bech32.o devtools/encodeaddr.o
-
-devtools/gossmap-compress: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o common/gossmap.o common/fp16.o devtools/gossmap-compress.o gossipd/gossip_store_wiregen.o
-
-devtools/bolt12-cli: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/bolt12_wiregen.o wire/fromwire.o wire/towire.o common/bolt12.o common/bolt12_merkle.o devtools/bolt12-cli.o common/setup.o common/iso4217.o
-
-devtools/decodemsg: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) $(WIRE_PRINT_OBJS) wire/fromwire.o wire/towire.o devtools/print_wire.o devtools/decodemsg.o
-
-devtools/dump-gossipstore: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/dump-gossipstore.o gossipd/gossip_store_wiregen.o
-
-devtools/dump-gossipstore.o: gossipd/gossip_store_wiregen.h
-
-devtools/convert-gossmap: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/convert-gossmap.o
-devtools/convert-gossmap.o: gossipd/gossip_store_wiregen.h
-
-devtools/create-gossipstore: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/create-gossipstore.o gossipd/gossip_store_wiregen.o
-devtools/create-gossipstore.o: gossipd/gossip_store_wiregen.h
-
-devtools/onion.c: ccan/config.h
-
-devtools/onion: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) common/onion_decode.o common/onion_encode.o common/onionreply.o wire/fromwire.o wire/towire.o devtools/onion.o common/sphinx.o
-
-devtools/gossipwith: $(DEVTOOLS_COMMON_OBJS) $(JSMN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/peer_wiregen.o devtools/gossipwith.o common/cryptomsg.o common/ping.o
-
-$(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h
-
-devtools/mkcommit: $(DEVTOOLS_COMMON_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) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/key_derive.o devtools/mkfunding.o
-
-devtools/mkclose: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/mkclose.o
-
-devtools/mkgossip: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/utxo.o common/permute_tx.o common/key_derive.o devtools/mkgossip.o
-
-devtools/mkencoded: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/mkencoded.o
-
-devtools/checkchannels: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/checkchannels.o common/configdir.o common/configvar.o
-
-devtools/mkquery: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/mkquery.o
-
-devtools/lightning-checkmessage: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/lightning-checkmessage.o
-
-devtools/bip137-verifysignature: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/bip137-verifysignature.o
-
-devtools/route: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o common/gossmap.o common/fp16.o common/random_select.o common/route.o common/dijkstra.o devtools/clean_topo.o devtools/route.o
-
-devtools/topology: $(DEVTOOLS_COMMON_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o wire/tlvstream.o common/gossmap.o common/fp16.o common/random_select.o common/dijkstra.o common/route.o devtools/clean_topo.o devtools/topology.o
+devtools/route devtools/topology: devtools/clean_topo.o
+devtools/route.o devtools/topology.o: devtools/clean_topo.h
diff --git a/gossipd/Makefile b/gossipd/Makefile
index c073248..1ee7a27 100644
--- a/gossipd/Makefile
+++ b/gossipd/Makefile
@@ -24,52 +24,7 @@ ALL_PROGRAMS += lightningd/lightning_gossipd
LIGHTNINGD_CONTROL_HEADERS += gossipd/gossipd_wiregen.h
LIGHTNINGD_CONTROL_OBJS += gossipd/gossipd_wiregen.o
-# Common source we use.
-GOSSIPD_COMMON_OBJS := \
- bitcoin/chainparams.o \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bech32.o \
- common/bech32_util.o \
- common/bigsize.o \
- common/bip32.o \
- common/channel_id.o \
- common/cryptomsg.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/decode_array.o \
- common/derive_basepoints.o \
- common/dev_disconnect.o \
- common/ecdh_hsmd.o \
- common/features.o \
- common/gossmap.o \
- common/fp16.o \
- common/status_wiregen.o \
- common/key_derive.o \
- common/lease_rates.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/per_peer_state.o \
- common/ping.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/random_select.o \
- common/setup.o \
- common/status.o \
- common/status_wire.o \
- common/subdaemon.o \
- common/timeout.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wireaddr.o \
- common/wire_error.o \
- connectd/connectd_gossipd_wiregen.o
-
-lightningd/lightning_gossipd: $(GOSSIPD_OBJS) $(GOSSIPD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(HSMD_CLIENT_OBJS)
+lightningd/lightning_gossipd: $(GOSSIPD_OBJS) $(HSMD_CLIENT_OBJS) connectd/connectd_gossipd_wiregen.o libcommon.a
# The CSV was removed, but the generated files may live on!
clean: clean-old-gossip-gen
diff --git a/gossipd/test/Makefile b/gossipd/test/Makefile
index 99cb7fa..a05e4fd 100644
--- a/gossipd/test/Makefile
+++ b/gossipd/test/Makefile
@@ -6,48 +6,12 @@ GOSSIPD_TEST_SRC := $(wildcard gossipd/test/run-*.c)
GOSSIPD_TEST_OBJS := $(GOSSIPD_TEST_SRC:.c=.o)
GOSSIPD_TEST_PROGRAMS := $(GOSSIPD_TEST_OBJS:.o=)
-GOSSIPD_TEST_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/coin_mvt.o \
- common/bigsize.o \
- common/blindedpath.o \
- common/channel_id.o \
- common/features.o \
- common/hmac.o \
- common/node_id.o \
- common/lease_rates.o \
- common/pseudorand.o \
- common/setup.o \
- common/utils.o \
- common/wireaddr.o \
- gossipd/gossip_store_wiregen.o \
- wire/peer_wiregen.o \
- wire/onion_wiregen.o \
- wire/fromwire.o \
- wire/tlvstream.o \
- wire/towire.o
-
ALL_C_SOURCES += $(GOSSIPD_TEST_SRC)
ALL_TEST_PROGRAMS += $(GOSSIPD_TEST_PROGRAMS)
-# Extra stuff needed for onion tests
-gossipd/test/run-onion_message: \
- wire/onion_wiregen.o \
- common/blindedpath.o \
- common/blinding.o \
- common/hmac.o \
- common/sphinx.o \
-
-# JSON needed for this test
-gossipd/test/run-extended-info: \
- common/json_parse.o \
- common/json_parse_simple.o
-
-$(GOSSIPD_TEST_PROGRAMS): $(GOSSIPD_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
+$(GOSSIPD_TEST_PROGRAMS): libcommon.a
# Test objects depend on ../ src and headers.
-$(GOSSIPD_TEST_OBJS): $(GOSSIPD_HEADERS) $(GOSSIPD_SRC)
+$(GOSSIPD_TEST_OBJS): $(GOSSIPD_HEADERS) $(GOSSIPD_SRC) gossipd/test/Makefile
gossipd-tests: $(GOSSIPD_TEST_PROGRAMS:%=unittest/%)
diff --git a/gossipd/test/run-check_channel_announcement.c b/gossipd/test/run-check_channel_announcement.c
index 6c743d4..b16b887 100644
--- a/gossipd/test/run-check_channel_announcement.c
+++ b/gossipd/test/run-check_channel_announcement.c
@@ -41,29 +41,6 @@ In particular, we set feature bit 19. The spec says we should set feature bit 1
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for blinding_hash_e_and_ss */
-void blinding_hash_e_and_ss(const struct pubkey *e UNNEEDED,
- const struct secret *ss UNNEEDED,
- struct sha256 *sha UNNEEDED)
-{ fprintf(stderr, "blinding_hash_e_and_ss called!\n"); abort(); }
-/* Generated stub for blinding_next_path_key */
-bool blinding_next_path_key(const struct pubkey *pk UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct pubkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_key called!\n"); abort(); }
-/* Generated stub for blinding_next_path_privkey */
-bool blinding_next_path_privkey(const struct privkey *e UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct privkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_privkey called!\n"); abort(); }
-/* Generated stub for fromwire_sciddir_or_pubkey */
-void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "fromwire_sciddir_or_pubkey called!\n"); abort(); }
-/* Generated stub for towire_sciddir_or_pubkey */
-void towire_sciddir_or_pubkey(u8 **pptr UNNEEDED,
- const struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "towire_sciddir_or_pubkey called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/gossipd/test/run-extended-info.c b/gossipd/test/run-extended-info.c
index 45e1988..0fee410 100644
--- a/gossipd/test/run-extended-info.c
+++ b/gossipd/test/run-extended-info.c
@@ -16,32 +16,6 @@
#endif
/* AUTOGENERATED MOCKS START */
-/* Generated stub for blinding_hash_e_and_ss */
-void blinding_hash_e_and_ss(const struct pubkey *e UNNEEDED,
- const struct secret *ss UNNEEDED,
- struct sha256 *sha UNNEEDED)
-{ fprintf(stderr, "blinding_hash_e_and_ss called!\n"); abort(); }
-/* Generated stub for blinding_next_path_key */
-bool blinding_next_path_key(const struct pubkey *pk UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct pubkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_key called!\n"); abort(); }
-/* Generated stub for blinding_next_path_privkey */
-bool blinding_next_path_privkey(const struct privkey *e UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct privkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_privkey called!\n"); abort(); }
-/* Generated stub for decode_channel_update_timestamps */
-struct channel_update_timestamps *decode_channel_update_timestamps(const tal_t *ctx UNNEEDED,
- const struct tlv_reply_channel_range_tlvs_timestamps_tlv *timestamps_tlv UNNEEDED)
-{ fprintf(stderr, "decode_channel_update_timestamps called!\n"); abort(); }
-/* Generated stub for decode_short_ids */
-struct short_channel_id *decode_short_ids(const tal_t *ctx UNNEEDED, const u8 *encoded UNNEEDED)
-{ fprintf(stderr, "decode_short_ids called!\n"); abort(); }
-/* Generated stub for fromwire_sciddir_or_pubkey */
-void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "fromwire_sciddir_or_pubkey called!\n"); abort(); }
/* Generated stub for peer_supplied_query_response */
void peer_supplied_query_response(struct daemon *daemon UNNEEDED,
const struct node_id *source_peer UNNEEDED,
@@ -52,15 +26,6 @@ void queue_peer_msg(struct daemon *daemon UNNEEDED,
const struct node_id *peer UNNEEDED,
const u8 *msg TAKES UNNEEDED)
{ fprintf(stderr, "queue_peer_msg called!\n"); abort(); }
-/* Generated stub for towire_sciddir_or_pubkey */
-void towire_sciddir_or_pubkey(u8 **pptr UNNEEDED,
- const struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "towire_sciddir_or_pubkey called!\n"); abort(); }
-/* Generated stub for towire_warningfmt */
-u8 *towire_warningfmt(const tal_t *ctx UNNEEDED,
- const struct channel_id *channel UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "towire_warningfmt called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
void status_fmt(enum log_level level UNNEEDED,
diff --git a/gossipd/test/run-next_block_range.c b/gossipd/test/run-next_block_range.c
index 49bd20f..60b9530 100644
--- a/gossipd/test/run-next_block_range.c
+++ b/gossipd/test/run-next_block_range.c
@@ -12,24 +12,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for blinding_hash_e_and_ss */
-void blinding_hash_e_and_ss(const struct pubkey *e UNNEEDED,
- const struct secret *ss UNNEEDED,
- struct sha256 *sha UNNEEDED)
-{ fprintf(stderr, "blinding_hash_e_and_ss called!\n"); abort(); }
-/* Generated stub for blinding_next_path_key */
-bool blinding_next_path_key(const struct pubkey *pk UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct pubkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_key called!\n"); abort(); }
-/* Generated stub for blinding_next_path_privkey */
-bool blinding_next_path_privkey(const struct privkey *e UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct privkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_privkey called!\n"); abort(); }
-/* Generated stub for daemon_conn_send */
-void daemon_conn_send(struct daemon_conn *dc UNNEEDED, const u8 *msg UNNEEDED)
-{ fprintf(stderr, "daemon_conn_send called!\n"); abort(); }
/* Generated stub for find_peer */
struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id UNNEEDED)
{ fprintf(stderr, "find_peer called!\n"); abort(); }
@@ -37,83 +19,12 @@ struct peer *find_peer(struct daemon *daemon UNNEEDED, const struct node_id *id
struct peer *first_random_peer(struct daemon *daemon UNNEEDED,
struct peer_node_id_map_iter *it UNNEEDED)
{ fprintf(stderr, "first_random_peer called!\n"); abort(); }
-/* Generated stub for fromwire_sciddir_or_pubkey */
-void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "fromwire_sciddir_or_pubkey called!\n"); abort(); }
-/* Generated stub for gossmap_chan_get_update_details */
-void gossmap_chan_get_update_details(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *chan UNNEEDED,
- int dir UNNEEDED,
- u32 *timestamp UNNEEDED,
- u8 *message_flags UNNEEDED,
- u8 *channel_flags UNNEEDED,
- u16 *cltv_expiry_delta UNNEEDED,
- u32 *fee_base_msat UNNEEDED,
- u32 *fee_proportional_millionths UNNEEDED,
- struct amount_msat *htlc_minimum_msat UNNEEDED,
- struct amount_msat *htlc_maximum_msat UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_get_update_details called!\n"); abort(); }
-/* Generated stub for gossmap_chan_scid */
-struct short_channel_id gossmap_chan_scid(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *c UNNEEDED)
-{ fprintf(stderr, "gossmap_chan_scid called!\n"); abort(); }
-/* Generated stub for gossmap_find_chan */
-struct gossmap_chan *gossmap_find_chan(const struct gossmap *map UNNEEDED,
- const struct short_channel_id *scid UNNEEDED)
-{ fprintf(stderr, "gossmap_find_chan called!\n"); abort(); }
-/* Generated stub for gossmap_first_node */
-struct gossmap_node *gossmap_first_node(const struct gossmap *map UNNEEDED)
-{ fprintf(stderr, "gossmap_first_node called!\n"); abort(); }
/* Generated stub for gossmap_manage_get_gossmap */
struct gossmap *gossmap_manage_get_gossmap(struct gossmap_manage *gm UNNEEDED)
{ fprintf(stderr, "gossmap_manage_get_gossmap called!\n"); abort(); }
/* Generated stub for gossmap_manage_populated */
bool gossmap_manage_populated(const struct gossmap_manage *gm UNNEEDED)
{ fprintf(stderr, "gossmap_manage_populated called!\n"); abort(); }
-/* Generated stub for gossmap_max_node_idx */
-u32 gossmap_max_node_idx(const struct gossmap *map UNNEEDED)
-{ fprintf(stderr, "gossmap_max_node_idx called!\n"); abort(); }
-/* Generated stub for gossmap_next_node */
-struct gossmap_node *gossmap_next_node(const struct gossmap *map UNNEEDED,
- const struct gossmap_node *prev UNNEEDED)
-{ fprintf(stderr, "gossmap_next_node called!\n"); abort(); }
-/* Generated stub for gossmap_node_byidx */
-struct gossmap_node *gossmap_node_byidx(const struct gossmap *map UNNEEDED, u32 idx UNNEEDED)
-{ fprintf(stderr, "gossmap_node_byidx called!\n"); abort(); }
-/* Generated stub for gossmap_node_get_announce */
-u8 *gossmap_node_get_announce(const tal_t *ctx UNNEEDED,
- const struct gossmap *map UNNEEDED,
- const struct gossmap_node *n UNNEEDED)
-{ fprintf(stderr, "gossmap_node_get_announce called!\n"); abort(); }
-/* Generated stub for gossmap_node_get_id */
-void gossmap_node_get_id(const struct gossmap *map UNNEEDED,
- const struct gossmap_node *node UNNEEDED,
- struct node_id *id UNNEEDED)
-{ fprintf(stderr, "gossmap_node_get_id called!\n"); abort(); }
-/* Generated stub for gossmap_nth_chan */
-struct gossmap_chan *gossmap_nth_chan(const struct gossmap *map UNNEEDED,
- const struct gossmap_node *node UNNEEDED,
- u32 n UNNEEDED,
- int *which_half UNNEEDED)
-{ fprintf(stderr, "gossmap_nth_chan called!\n"); abort(); }
-/* Generated stub for gossmap_nth_node */
-struct gossmap_node *gossmap_nth_node(const struct gossmap *map UNNEEDED,
- const struct gossmap_chan *chan UNNEEDED,
- int n UNNEEDED)
-{ fprintf(stderr, "gossmap_nth_node called!\n"); abort(); }
-/* Generated stub for gossmap_random_node */
-struct gossmap_node *gossmap_random_node(const struct gossmap *map UNNEEDED)
-{ fprintf(stderr, "gossmap_random_node called!\n"); abort(); }
-/* Generated stub for memleak_scan_intmap_ */
-void memleak_scan_intmap_(struct htable *memtable UNNEEDED, const struct intmap *m UNNEEDED)
-{ fprintf(stderr, "memleak_scan_intmap_ called!\n"); abort(); }
-/* Generated stub for new_reltimer_ */
-struct oneshot *new_reltimer_(struct timers *timers UNNEEDED,
- const tal_t *ctx UNNEEDED,
- struct timerel expire UNNEEDED,
- void (*cb)(void *) UNNEEDED, void *arg UNNEEDED)
-{ fprintf(stderr, "new_reltimer_ called!\n"); abort(); }
/* Generated stub for next_random_peer */
struct peer *next_random_peer(struct daemon *daemon UNNEEDED,
const struct peer *first UNNEEDED,
@@ -141,23 +52,9 @@ void queue_peer_msg(struct daemon *daemon UNNEEDED,
const struct node_id *peer UNNEEDED,
const u8 *msg TAKES UNNEEDED)
{ fprintf(stderr, "queue_peer_msg called!\n"); abort(); }
-/* Generated stub for status_failed */
-void status_failed(enum status_failreason code UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "status_failed called!\n"); abort(); }
-/* Generated stub for status_fmt */
-void status_fmt(enum log_level level UNNEEDED,
- const struct node_id *peer UNNEEDED,
- const char *fmt UNNEEDED, ...)
-
-{ fprintf(stderr, "status_fmt called!\n"); abort(); }
/* Generated stub for towire_gossipd_connect_to_peer */
u8 *towire_gossipd_connect_to_peer(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED)
{ fprintf(stderr, "towire_gossipd_connect_to_peer called!\n"); abort(); }
-/* Generated stub for towire_sciddir_or_pubkey */
-void towire_sciddir_or_pubkey(u8 **pptr UNNEEDED,
- const struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "towire_sciddir_or_pubkey called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static void test_block_range(struct seeker *seeker,
diff --git a/gossipd/test/run-txout_failure.c b/gossipd/test/run-txout_failure.c
index ebb740e..4d3df88 100644
--- a/gossipd/test/run-txout_failure.c
+++ b/gossipd/test/run-txout_failure.c
@@ -14,29 +14,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for blinding_hash_e_and_ss */
-void blinding_hash_e_and_ss(const struct pubkey *e UNNEEDED,
- const struct secret *ss UNNEEDED,
- struct sha256 *sha UNNEEDED)
-{ fprintf(stderr, "blinding_hash_e_and_ss called!\n"); abort(); }
-/* Generated stub for blinding_next_path_key */
-bool blinding_next_path_key(const struct pubkey *pk UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct pubkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_key called!\n"); abort(); }
-/* Generated stub for blinding_next_path_privkey */
-bool blinding_next_path_privkey(const struct privkey *e UNNEEDED,
- const struct sha256 *h UNNEEDED,
- struct privkey *next UNNEEDED)
-{ fprintf(stderr, "blinding_next_path_privkey called!\n"); abort(); }
-/* Generated stub for fromwire_sciddir_or_pubkey */
-void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "fromwire_sciddir_or_pubkey called!\n"); abort(); }
-/* Generated stub for towire_sciddir_or_pubkey */
-void towire_sciddir_or_pubkey(u8 **pptr UNNEEDED,
- const struct sciddir_or_pubkey *sciddpk UNNEEDED)
-{ fprintf(stderr, "towire_sciddir_or_pubkey called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/hsmd/Makefile b/hsmd/Makefile
index b4f51be..c60f960 100644
--- a/hsmd/Makefile
+++ b/hsmd/Makefile
@@ -14,48 +14,13 @@ $(HSMD_OBJS): $(HSMD_HEADERS)
HSMD_CLIENT_OBJS := \
hsmd/hsmd_wiregen.o \
hsmd/hsm_utxo.o \
- common/htlc_wire.o
# Make sure these depend on everything.
ALL_C_SOURCES += $(HSMD_SRC)
ALL_C_HEADERS += $(HSMD_HEADERS)
ALL_PROGRAMS += lightningd/lightning_hsmd
-# Common source we use.
-HSMD_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bigsize.o \
- common/bip32.o \
- common/bolt12_id.o \
- common/bolt12_merkle.o \
- common/channel_id.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/derive_basepoints.o \
- common/hash_u5.o \
- common/hsm_encryption.o \
- common/htlc_wire.o \
- common/key_derive.o \
- common/lease_rates.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/permute_tx.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/setup.o \
- common/status.o \
- common/status_wire.o \
- common/status_wiregen.o \
- common/subdaemon.o \
- common/utils.o \
- common/version.o \
- common/wireaddr.o
-
-lightningd/lightning_hsmd: $(HSMD_OBJS) $(HSMD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS)
+lightningd/lightning_hsmd: $(HSMD_OBJS) libcommon.a
check-source: check-hsm-versions
diff --git a/lightningd/Makefile b/lightningd/Makefile
index fbf1d10..4fb5afb 100644
--- a/lightningd/Makefile
+++ b/lightningd/Makefile
@@ -72,90 +72,6 @@ ALL_PROGRAMS += lightningd/lightningd
# We explicitly check header versions in lightningd.c
lightningd/lightningd.o: header_versions_gen.h
-# Common source we use.
-LIGHTNINGD_COMMON_OBJS := \
- common/addr.o \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/base64.o \
- common/bech32.o \
- common/bech32_util.o \
- common/bigsize.o \
- common/bip32.o \
- common/blindedpath.o \
- common/blinding.o \
- common/blockheight_states.o \
- common/bolt11.o \
- common/bolt11_json.o \
- common/bolt12.o \
- common/bolt12_id.o \
- common/bolt12_merkle.o \
- common/codex32.o \
- common/channel_config.o \
- common/channel_id.o \
- common/channel_type.o \
- common/coin_mvt.o \
- common/configdir.o \
- common/configvar.o \
- common/daemon.o \
- common/deprecation.o \
- common/derive_basepoints.o \
- common/ecdh_hsmd.o \
- common/features.o \
- common/fee_states.o \
- common/peer_status_wiregen.o \
- common/scb_wiregen.o \
- common/status_levels.o \
- common/status_wiregen.o \
- common/hash_u5.o \
- common/hmac.o \
- common/hsm_capable.o \
- common/hsm_encryption.o \
- common/htlc_state.o \
- common/htlc_trim.o \
- common/htlc_tx.o \
- common/htlc_wire.o \
- common/key_derive.o \
- common/keyset.o \
- common/json_channel_type.o \
- common/json_command.o \
- common/json_filter.o \
- common/json_param.o \
- common/json_parse.o \
- common/json_parse_simple.o \
- common/json_stream.o \
- common/lease_rates.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onion_decode.o \
- common/onion_encode.o \
- common/onionreply.o \
- common/penalty_base.o \
- common/per_peer_state.o \
- common/permute_tx.o \
- common/psbt_keypath.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/plugin.o \
- common/random_select.o \
- common/setup.o \
- common/shutdown_scriptpubkey.o \
- common/sphinx.o \
- common/status_wire.o \
- common/timeout.o \
- common/trace.o \
- common/tx_roles.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wallet.o \
- common/wire_error.o \
- common/wireaddr.o \
- db/bindings.o \
- db/exec.o \
-
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HDRS)
$(WALLET_OBJS): $(LIGHTNINGD_HDRS) $(DB_HEADERS)
@@ -165,6 +81,6 @@ lightningd/plugin.o: plugins/list_of_builtin_plugins_gen.h
lightningd/channel_state_names_gen.h: lightningd/channel_state.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > $@
-lightningd/lightningd: $(LIGHTNINGD_OBJS) $(WALLET_OBJS) $(LIGHTNINGD_COMMON_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(WIRE_BOLT12_OBJS) $(LIGHTNINGD_CONTROL_OBJS) $(HSMD_CLIENT_OBJS) $(DB_OBJS)
+lightningd/lightningd: $(LIGHTNINGD_OBJS) $(WALLET_OBJS) $(LIGHTNINGD_CONTROL_OBJS) $(HSMD_CLIENT_OBJS) $(DB_OBJS) libcommon.a
include lightningd/test/Makefile
diff --git a/lightningd/test/Makefile b/lightningd/test/Makefile
index a9aa3c1..ade3d8c 100644
--- a/lightningd/test/Makefile
+++ b/lightningd/test/Makefile
@@ -10,29 +10,8 @@ ALL_TEST_PROGRAMS += $(LIGHTNINGD_TEST_PROGRAMS)
# run-find_my_abspath.c includes lightningd.c, which includes header_versions_gen.h
lightningd/test/run-find_my_abspath.o: header_versions_gen.h
-LIGHTNINGD_TEST_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bech32.o \
- common/daemon_conn.o \
- common/htlc_state.o \
- common/htlc_wire.o \
- common/json_parse_simple.o \
- common/key_derive.o \
- common/pseudorand.o \
- common/random_select.o \
- common/memleak.o \
- common/msg_queue.o \
- common/onionreply.o \
- common/setup.o \
- common/utils.o \
- common/utxo.o \
- common/permute_tx.o \
- common/wireaddr.o \
+$(LIGHTNINGD_TEST_PROGRAMS): libcommon.a
-$(LIGHTNINGD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNINGD_TEST_COMMON_OBJS) $(WIRE_BOLT12_OBJS)
-
-$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HDRS) $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR)
+$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HDRS) $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR) lightningd/test/Makefile
check-units: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%)
diff --git a/lightningd/test/run-check_node_announcement.c b/lightningd/test/run-check_node_announcement.c
index c41bc1b..01155a6 100644
--- a/lightningd/test/run-check_node_announcement.c
+++ b/lightningd/test/run-check_node_announcement.c
@@ -10,44 +10,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for check_signed_hash_nodeid */
-bool check_signed_hash_nodeid(const struct sha256_double *hash UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED,
- const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "check_signed_hash_nodeid 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 get_agreed_channelfeatures */
-u8 *get_agreed_channelfeatures(const tal_t *ctx UNNEEDED,
- const struct feature_set *our_features UNNEEDED,
- const u8 *theirfeatures UNNEEDED)
-{ fprintf(stderr, "get_agreed_channelfeatures called!\n"); abort(); }
-/* Generated stub for node_id_cmp */
-int node_id_cmp(const struct node_id *a UNNEEDED, const struct node_id *b UNNEEDED)
-{ fprintf(stderr, "node_id_cmp called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/lightningd/test/run-find_my_abspath.c b/lightningd/test/run-find_my_abspath.c
index 4c86ad9..1d7067c 100644
--- a/lightningd/test/run-find_my_abspath.c
+++ b/lightningd/test/run-find_my_abspath.c
@@ -4,6 +4,7 @@ int unused_main(int argc, char *argv[]);
#include "../io_loop_with_timers.c"
#include "../lightningd.c"
#include "../subd.c"
+#include <common/json_command.h>
#include <common/setup.h>
/* AUTOGENERATED MOCKS START */
@@ -16,6 +17,25 @@ void channel_gossip_notify_new_block(struct lightningd *ld UNNEEDED)
/* Generated stub for channel_notify_new_block */
void channel_notify_new_block(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "channel_notify_new_block called!\n"); abort(); }
+/* Generated stub for command_check_only */
+bool command_check_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_check_only called!\n"); abort(); }
+/* Generated stub for command_dev_apis */
+bool command_dev_apis(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_dev_apis called!\n"); abort(); }
+/* Generated stub for command_fail */
+struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_fail called!\n"); abort(); }
+/* Generated stub for command_filter_ptr */
+struct json_filter **command_filter_ptr(struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_filter_ptr called!\n"); abort(); }
+/* Generated stub for command_log */
+void command_log(struct command *cmd UNNEEDED, enum log_level level UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_log called!\n"); abort(); }
/* Generated stub for connectd_activate */
void connectd_activate(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "connectd_activate called!\n"); abort(); }
@@ -25,20 +45,6 @@ int connectd_init(struct lightningd *ld UNNEEDED)
/* Generated stub for connectd_start_shutdown */
void connectd_start_shutdown(struct subd *connectd UNNEEDED)
{ fprintf(stderr, "connectd_start_shutdown called!\n"); abort(); }
-/* Generated stub for daemon_developer_mode */
-bool daemon_developer_mode(char *argv[])
-{ fprintf(stderr, "daemon_developer_mode called!\n"); abort(); }
-/* Generated stub for daemon_poll */
-int daemon_poll(struct pollfd *fds UNNEEDED, nfds_t nfds UNNEEDED, int timeout UNNEEDED)
-{ fprintf(stderr, "daemon_poll called!\n"); abort(); }
-/* Generated stub for daemon_setup */
-void daemon_setup(const char *argv0 UNNEEDED,
- void (*backtrace_print)(const char *fmt UNNEEDED, ...) UNNEEDED,
- void (*backtrace_exit)(void))
-{ fprintf(stderr, "daemon_setup called!\n"); abort(); }
-/* Generated stub for daemon_shutdown */
-void daemon_shutdown(void)
-{ fprintf(stderr, "daemon_shutdown called!\n"); abort(); }
/* Generated stub for db_begin_transaction_ */
void db_begin_transaction_(struct db *db UNNEEDED, const char *location UNNEEDED)
{ fprintf(stderr, "db_begin_transaction_ called!\n"); abort(); }
@@ -51,61 +57,15 @@ s64 db_get_intvar(struct db *db UNNEEDED, const char *varname UNNEEDED, s64 defv
/* Generated stub for db_in_transaction */
bool db_in_transaction(struct db *db UNNEEDED)
{ fprintf(stderr, "db_in_transaction called!\n"); abort(); }
-/* Generated stub for deprecated_ok_ */
-bool deprecated_ok_(bool deprecated_apis UNNEEDED,
- const char *feature UNNEEDED,
- const char *start UNNEEDED,
- const char *end UNNEEDED,
- const char **begs UNNEEDED,
- void (*complain)(const char *feat UNNEEDED, bool allowing UNNEEDED, void *) UNNEEDED,
- void *cbarg UNNEEDED)
-{ fprintf(stderr, "deprecated_ok_ called!\n"); abort(); }
-/* Generated stub for discard_key */
-void discard_key(struct secret *key TAKES UNNEEDED)
-{ fprintf(stderr, "discard_key called!\n"); abort(); }
-/* Generated stub for ecdh_hsmd_setup */
-void ecdh_hsmd_setup(int hsm_fd UNNEEDED,
- void (*failed)(enum status_failreason UNNEEDED,
- const char *fmt UNNEEDED, ...))
-{ fprintf(stderr, "ecdh_hsmd_setup called!\n"); abort(); }
/* Generated stub for fatal */
void fatal(const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "fatal called!\n"); abort(); }
-/* Generated stub for feature_set_for_feature */
-struct feature_set *feature_set_for_feature(const tal_t *ctx UNNEEDED, int feature UNNEEDED)
-{ fprintf(stderr, "feature_set_for_feature called!\n"); abort(); }
-/* Generated stub for feature_set_or */
-bool feature_set_or(struct feature_set *a UNNEEDED,
- const struct feature_set *b TAKES UNNEEDED)
-{ fprintf(stderr, "feature_set_or called!\n"); abort(); }
-/* Generated stub for fmt_node_id */
-char *fmt_node_id(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "fmt_node_id called!\n"); abort(); }
/* Generated stub for free_htlcs */
void free_htlcs(struct lightningd *ld UNNEEDED, const struct channel *channel UNNEEDED)
{ fprintf(stderr, "free_htlcs 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 fromwire_status_fail */
-bool fromwire_status_fail(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, enum status_failreason *failreason UNNEEDED, wirestring **desc UNNEEDED)
-{ fprintf(stderr, "fromwire_status_fail called!\n"); abort(); }
-/* Generated stub for fromwire_status_peer_billboard */
-bool fromwire_status_peer_billboard(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, bool *perm UNNEEDED, wirestring **happenings UNNEEDED)
-{ fprintf(stderr, "fromwire_status_peer_billboard called!\n"); abort(); }
-/* Generated stub for fromwire_status_peer_error */
-bool fromwire_status_peer_error(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, bool *disconnect UNNEEDED, wirestring **desc UNNEEDED, bool *warning UNNEEDED, u8 **error_for_them UNNEEDED)
-{ fprintf(stderr, "fromwire_status_peer_error called!\n"); abort(); }
-/* Generated stub for fromwire_status_version */
-bool fromwire_status_version(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, wirestring **version UNNEEDED)
-{ fprintf(stderr, "fromwire_status_version called!\n"); abort(); }
+/* Generated stub for fromwire_hsmd_ecdh_resp */
+bool fromwire_hsmd_ecdh_resp(const void *p UNNEEDED, struct secret *ss UNNEEDED)
+{ fprintf(stderr, "fromwire_hsmd_ecdh_resp called!\n"); abort(); }
/* Generated stub for gossip_init */
void gossip_init(struct lightningd *ld UNNEEDED, int connectd_fd UNNEEDED)
{ fprintf(stderr, "gossip_init called!\n"); abort(); }
@@ -137,11 +97,6 @@ void htlcs_resubmit(struct lightningd *ld UNNEEDED,
/* Generated stub for invoices_start_expiration */
void invoices_start_expiration(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "invoices_start_expiration called!\n"); abort(); }
-/* Generated stub for json_add_string */
-void json_add_string(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *str TAKES UNNEEDED)
-{ fprintf(stderr, "json_add_string called!\n"); abort(); }
/* Generated stub for jsonrpc_listen */
void jsonrpc_listen(struct jsonrpc *rpc UNNEEDED, struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "jsonrpc_listen called!\n"); abort(); }
@@ -222,9 +177,6 @@ struct plugins *plugins_new(const tal_t *ctx UNNEEDED, struct log_book *log_book
void plugins_set_builtin_plugins_dir(struct plugins *plugins UNNEEDED,
const char *dir UNNEEDED)
{ fprintf(stderr, "plugins_set_builtin_plugins_dir called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
/* Generated stub for resend_closing_transactions */
void resend_closing_transactions(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "resend_closing_transactions called!\n"); abort(); }
@@ -234,9 +186,6 @@ struct runes *runes_early_init(struct lightningd *ld UNNEEDED)
/* Generated stub for runes_finish_init */
void runes_finish_init(struct runes *runes UNNEEDED)
{ fprintf(stderr, "runes_finish_init called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
/* Generated stub for setup_color_and_alias */
void setup_color_and_alias(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "setup_color_and_alias called!\n"); abort(); }
@@ -252,24 +201,9 @@ void shutdown_plugins(struct lightningd *ld UNNEEDED)
/* Generated stub for stop_topology */
void stop_topology(struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "stop_topology called!\n"); abort(); }
-/* Generated stub for timer_expired */
-void timer_expired(struct timer *timer UNNEEDED)
-{ fprintf(stderr, "timer_expired 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
-/* Generated stub for trace_span_end */
-void trace_span_end(const void *key UNNEEDED)
-{ fprintf(stderr, "trace_span_end called!\n"); abort(); }
-/* Generated stub for trace_span_start_ */
-void trace_span_start_(const char *name UNNEEDED, const void *key UNNEEDED)
-{ fprintf(stderr, "trace_span_start_ called!\n"); abort(); }
+/* Generated stub for towire_hsmd_ecdh_req */
+u8 *towire_hsmd_ecdh_req(const tal_t *ctx UNNEEDED, const struct pubkey *point UNNEEDED)
+{ fprintf(stderr, "towire_hsmd_ecdh_req called!\n"); abort(); }
/* Generated stub for txfilter_add_derkey */
void txfilter_add_derkey(struct txfilter *filter UNNEEDED,
const u8 derkey[PUBKEY_CMPR_LEN])
@@ -277,9 +211,6 @@ void txfilter_add_derkey(struct txfilter *filter UNNEEDED,
/* Generated stub for txfilter_new */
struct txfilter *txfilter_new(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "txfilter_new called!\n"); abort(); }
-/* Generated stub for version */
-const char *version(void)
-{ fprintf(stderr, "version called!\n"); abort(); }
/* Generated stub for waitblockheight_notify_new_block */
void waitblockheight_notify_new_block(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "waitblockheight_notify_new_block called!\n"); abort(); }
diff --git a/lightningd/test/run-invoice-select-inchan.c b/lightningd/test/run-invoice-select-inchan.c
index 44e8c5d..91b0744 100644
--- a/lightningd/test/run-invoice-select-inchan.c
+++ b/lightningd/test/run-invoice-select-inchan.c
@@ -26,42 +26,6 @@ void bitcoind_getutxout_(const tal_t *ctx UNNEEDED,
void *) UNNEEDED,
void *arg UNNEEDED)
{ fprintf(stderr, "bitcoind_getutxout_ called!\n"); abort(); }
-/* Generated stub for bolt11_decode */
-struct bolt11 *bolt11_decode(const tal_t *ctx UNNEEDED, const char *str UNNEEDED,
- const struct feature_set *our_features UNNEEDED,
- const char *description UNNEEDED,
- const struct chainparams *must_be_chain UNNEEDED,
- char **fail UNNEEDED)
-{ fprintf(stderr, "bolt11_decode called!\n"); abort(); }
-/* Generated stub for bolt11_decode_nosig */
-struct bolt11 *bolt11_decode_nosig(const tal_t *ctx UNNEEDED, const char *str UNNEEDED,
- const struct feature_set *our_features UNNEEDED,
- const char *description UNNEEDED,
- const struct chainparams *must_be_chain UNNEEDED,
- struct sha256 *hash UNNEEDED,
- const u5 **sig UNNEEDED,
- bool *have_n UNNEEDED,
- char **fail UNNEEDED)
-{ fprintf(stderr, "bolt11_decode_nosig called!\n"); abort(); }
-/* Generated stub for bolt11_encode_ */
-char *bolt11_encode_(const tal_t *ctx UNNEEDED,
- const struct bolt11 *b11 UNNEEDED, bool n_field UNNEEDED,
- bool (*sign)(const u5 *u5bytes UNNEEDED,
- const u8 *hrpu8 UNNEEDED,
- secp256k1_ecdsa_recoverable_signature *rsig UNNEEDED,
- void *arg) UNNEEDED,
- void *arg UNNEEDED)
-{ fprintf(stderr, "bolt11_encode_ called!\n"); abort(); }
-/* Generated stub for bolt12_path_id */
-u8 *bolt12_path_id(const tal_t *ctx UNNEEDED,
- const struct secret *base_secret UNNEEDED,
- const struct sha256 *payment_hash UNNEEDED)
-{ fprintf(stderr, "bolt12_path_id called!\n"); abort(); }
-/* Generated stub for bolt12_path_secret */
-void bolt12_path_secret(const struct secret *base_secret UNNEEDED,
- const struct sha256 *payment_hash UNNEEDED,
- struct secret *path_secret UNNEEDED)
-{ fprintf(stderr, "bolt12_path_secret called!\n"); abort(); }
/* Generated stub for broadcast_tx_ */
void broadcast_tx_(const tal_t *ctx UNNEEDED,
struct chain_topology *topo UNNEEDED,
@@ -144,13 +108,6 @@ const char *channel_state_name(const struct channel *channel UNNEEDED)
/* Generated stub for channel_state_str */
const char *channel_state_str(enum channel_state state UNNEEDED)
{ fprintf(stderr, "channel_state_str called!\n"); abort(); }
-/* Generated stub for channel_type_dup */
-struct channel_type *channel_type_dup(const tal_t *ctx UNNEEDED,
- const struct channel_type *t UNNEEDED)
-{ fprintf(stderr, "channel_type_dup called!\n"); abort(); }
-/* Generated stub for channel_type_has */
-bool channel_type_has(const struct channel_type *type UNNEEDED, int feature UNNEEDED)
-{ fprintf(stderr, "channel_type_has called!\n"); abort(); }
/* Generated stub for channel_unsaved_close_conn */
void channel_unsaved_close_conn(struct channel *channel UNNEEDED, const char *why UNNEEDED)
{ fprintf(stderr, "channel_unsaved_close_conn called!\n"); abort(); }
@@ -178,32 +135,42 @@ struct command_result *command_check_done(struct command *cmd)
/* Generated stub for command_check_only */
bool command_check_only(const struct command *cmd UNNEEDED)
{ fprintf(stderr, "command_check_only called!\n"); abort(); }
+/* Generated stub for command_deprecated_in_ok */
+bool command_deprecated_in_ok(struct command *cmd UNNEEDED,
+ const char *param UNNEEDED,
+ const char *depr_start UNNEEDED,
+ const char *depr_end UNNEEDED)
+{ fprintf(stderr, "command_deprecated_in_ok called!\n"); abort(); }
/* Generated stub for command_deprecated_out_ok */
bool command_deprecated_out_ok(struct command *cmd UNNEEDED,
const char *fieldname UNNEEDED,
const char *depr_start UNNEEDED,
const char *depr_end UNNEEDED)
{ fprintf(stderr, "command_deprecated_out_ok called!\n"); abort(); }
+/* Generated stub for command_dev_apis */
+bool command_dev_apis(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_dev_apis called!\n"); abort(); }
/* Generated stub for command_fail */
struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "command_fail called!\n"); abort(); }
-/* Generated stub for command_fail_badparam */
-struct command_result *command_fail_badparam(struct command *cmd UNNEEDED,
- const char *paramname UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *msg UNNEEDED)
-{ fprintf(stderr, "command_fail_badparam called!\n"); abort(); }
/* Generated stub for command_failed */
struct command_result *command_failed(struct command *cmd UNNEEDED,
struct json_stream *result)
{ fprintf(stderr, "command_failed called!\n"); abort(); }
+/* Generated stub for command_filter_ptr */
+struct json_filter **command_filter_ptr(struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_filter_ptr called!\n"); abort(); }
/* Generated stub for command_its_complicated */
struct command_result *command_its_complicated(const char *why UNNEEDED)
{ fprintf(stderr, "command_its_complicated called!\n"); abort(); }
+/* Generated stub for command_log */
+void command_log(struct command *cmd UNNEEDED, enum log_level level UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_log called!\n"); abort(); }
/* Generated stub for command_logger */
struct logger *command_logger(struct command *cmd UNNEEDED)
{ fprintf(stderr, "command_logger called!\n"); abort(); }
@@ -211,6 +178,9 @@ struct logger *command_logger(struct command *cmd UNNEEDED)
struct command_result *command_param_failed(void)
{ fprintf(stderr, "command_param_failed called!\n"); abort(); }
+/* Generated stub for command_set_usage */
+void command_set_usage(struct command *cmd UNNEEDED, const char *usage UNNEEDED)
+{ fprintf(stderr, "command_set_usage called!\n"); abort(); }
/* Generated stub for command_still_pending */
struct command_result *command_still_pending(struct command *cmd)
@@ -220,6 +190,9 @@ struct command_result *command_success(struct command *cmd UNNEEDED,
struct json_stream *response)
{ fprintf(stderr, "command_success called!\n"); abort(); }
+/* Generated stub for command_usage_only */
+bool command_usage_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_usage_only called!\n"); abort(); }
/* Generated stub for commit_tx_boost */
void commit_tx_boost(struct channel *channel UNNEEDED,
struct anchor_details *adet UNNEEDED,
@@ -260,33 +233,9 @@ bool depthcb_update_scid(struct channel *channel UNNEEDED,
/* Generated stub for dev_disconnect_permanent */
bool dev_disconnect_permanent(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "dev_disconnect_permanent called!\n"); abort(); }
-/* Generated stub for encode_scriptpubkey_to_addr */
-char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
- const struct chainparams *chainparams UNNEEDED,
- const u8 *scriptpubkey UNNEEDED)
-{ fprintf(stderr, "encode_scriptpubkey_to_addr called!\n"); abort(); }
-/* Generated stub for encrypt_tlv_encrypted_data */
-u8 *encrypt_tlv_encrypted_data(const tal_t *ctx UNNEEDED,
- const struct privkey *path_privkey UNNEEDED,
- const struct pubkey *node UNNEEDED,
- const struct tlv_encrypted_data_tlv *tlv UNNEEDED,
- struct privkey *next_path_privkey UNNEEDED,
- struct pubkey *node_alias)
-
-{ fprintf(stderr, "encrypt_tlv_encrypted_data called!\n"); abort(); }
/* Generated stub for fatal */
void fatal(const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "fatal called!\n"); abort(); }
-/* 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 featurebits_or */
-u8 *featurebits_or(const tal_t *ctx UNNEEDED, const u8 *f1 TAKES UNNEEDED, const u8 *f2 TAKES UNNEEDED)
-{ fprintf(stderr, "featurebits_or called!\n"); abort(); }
/* Generated stub for find_channel_by_id */
struct channel *find_channel_by_id(const struct peer *peer UNNEEDED,
const struct channel_id *cid UNNEEDED)
@@ -298,24 +247,11 @@ struct plugin *find_plugin_for_command(struct lightningd *ld UNNEEDED,
/* Generated stub for fixup_htlcs_out */
void fixup_htlcs_out(struct lightningd *ld UNNEEDED)
{ fprintf(stderr, "fixup_htlcs_out called!\n"); abort(); }
-/* Generated stub for fmt_channel_id */
-char *fmt_channel_id(const tal_t *ctx UNNEEDED, const struct channel_id *channel_id UNNEEDED)
-{ fprintf(stderr, "fmt_channel_id called!\n"); abort(); }
-/* Generated stub for fmt_node_id */
-char *fmt_node_id(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "fmt_node_id called!\n"); abort(); }
/* Generated stub for force_peer_disconnect */
void force_peer_disconnect(struct lightningd *ld UNNEEDED,
const struct peer *peer UNNEEDED,
const char *why UNNEEDED)
{ fprintf(stderr, "force_peer_disconnect 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(); }
-/* Generated stub for fromwire_channel_id */
-bool fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- struct channel_id *channel_id UNNEEDED)
-{ fprintf(stderr, "fromwire_channel_id called!\n"); abort(); }
/* Generated stub for fromwire_channeld_dev_memleak_reply */
bool fromwire_channeld_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_channeld_dev_memleak_reply called!\n"); abort(); }
@@ -355,9 +291,6 @@ bool fromwire_hsmd_sign_commitment_tx_reply(const void *p UNNEEDED, struct bitco
/* Generated stub for fromwire_hsmd_sign_invoice_reply */
bool fromwire_hsmd_sign_invoice_reply(const void *p UNNEEDED, secp256k1_ecdsa_recoverable_signature *sig UNNEEDED)
{ fprintf(stderr, "fromwire_hsmd_sign_invoice_reply called!\n"); abort(); }
-/* 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 fromwire_onchaind_dev_memleak_reply */
bool fromwire_onchaind_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNEEDED)
{ fprintf(stderr, "fromwire_onchaind_dev_memleak_reply called!\n"); abort(); }
@@ -367,11 +300,6 @@ bool fromwire_openingd_dev_memleak_reply(const void *p UNNEEDED, bool *leak UNNE
/* Generated stub for get_block_height */
u32 get_block_height(const struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "get_block_height called!\n"); abort(); }
-/* Generated stub for get_feerate */
-u32 get_feerate(const struct fee_states *fee_states UNNEEDED,
- enum side opener UNNEEDED,
- enum side side UNNEEDED)
-{ fprintf(stderr, "get_feerate called!\n"); abort(); }
/* Generated stub for hash_cid */
size_t hash_cid(const struct channel_id *cid UNNEEDED)
{ fprintf(stderr, "hash_cid called!\n"); abort(); }
@@ -386,15 +314,6 @@ const u8 *hsm_sync_req(const tal_t *ctx UNNEEDED,
struct lightningd *ld UNNEEDED,
const u8 *msg TAKES UNNEEDED)
{ fprintf(stderr, "hsm_sync_req called!\n"); abort(); }
-/* Generated stub for htlc_is_trimmed */
-bool htlc_is_trimmed(enum side htlc_owner UNNEEDED,
- struct amount_msat htlc_amount UNNEEDED,
- u32 feerate_per_kw UNNEEDED,
- struct amount_sat dust_limit UNNEEDED,
- enum side side UNNEEDED,
- bool option_anchor_outputs UNNEEDED,
- bool option_anchors_zero_fee_htlc_tx UNNEEDED)
-{ fprintf(stderr, "htlc_is_trimmed called!\n"); abort(); }
/* Generated stub for htlc_max_possible_send */
struct amount_msat htlc_max_possible_send(const struct channel *channel UNNEEDED)
{ fprintf(stderr, "htlc_max_possible_send called!\n"); abort(); }
@@ -405,26 +324,6 @@ void htlc_set_fail_(struct htlc_set *set UNNEEDED, const u8 *failmsg TAKES UNNEE
/* Generated stub for htlc_set_fulfill */
void htlc_set_fulfill(struct htlc_set *set UNNEEDED, const struct preimage *preimage UNNEEDED)
{ fprintf(stderr, "htlc_set_fulfill called!\n"); abort(); }
-/* Generated stub for invoice_decode */
-struct tlv_invoice *invoice_decode(const tal_t *ctx UNNEEDED,
- const char *b12 UNNEEDED, size_t b12len UNNEEDED,
- const struct feature_set *our_features UNNEEDED,
- const struct chainparams *must_be_chain UNNEEDED,
- char **fail UNNEEDED)
-{ fprintf(stderr, "invoice_decode called!\n"); abort(); }
-/* Generated stub for invoice_decode_minimal */
-struct tlv_invoice *invoice_decode_minimal(const tal_t *ctx UNNEEDED,
- const char *b12 UNNEEDED, size_t b12len UNNEEDED,
- const struct feature_set *our_features UNNEEDED,
- const struct chainparams *must_be_chain UNNEEDED,
- char **fail UNNEEDED)
-{ fprintf(stderr, "invoice_decode_minimal called!\n"); abort(); }
-/* Generated stub for invoice_encode */
-char *invoice_encode(const tal_t *ctx UNNEEDED, const struct tlv_invoice *bolt12_tlv UNNEEDED)
-{ fprintf(stderr, "invoice_encode called!\n"); abort(); }
-/* Generated stub for invoice_offer_id */
-void invoice_offer_id(const struct tlv_invoice *invoice UNNEEDED, struct sha256 *id UNNEEDED)
-{ fprintf(stderr, "invoice_offer_id called!\n"); abort(); }
/* Generated stub for invoices_create */
bool invoices_create(struct invoices *invoices UNNEEDED,
u64 *inv_dbid UNNEEDED,
@@ -514,121 +413,12 @@ void invoices_waitone(const tal_t *ctx UNNEEDED,
void (*cb)(const u64 * UNNEEDED, void*) UNNEEDED,
void *cbarg UNNEEDED)
{ fprintf(stderr, "invoices_waitone called!\n"); abort(); }
-/* Generated stub for json_add_address */
-void json_add_address(struct json_stream *response UNNEEDED, const char *fieldname UNNEEDED,
- const struct wireaddr *addr UNNEEDED)
-{ fprintf(stderr, "json_add_address called!\n"); abort(); }
-/* Generated stub for json_add_address_internal */
-void json_add_address_internal(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct wireaddr_internal *addr UNNEEDED)
-{ fprintf(stderr, "json_add_address_internal called!\n"); abort(); }
-/* Generated stub for json_add_amount_msat */
-void json_add_amount_msat(struct json_stream *result UNNEEDED,
- const char *msatfieldname UNNEEDED,
- struct amount_msat msat)
-
-{ fprintf(stderr, "json_add_amount_msat called!\n"); abort(); }
-/* Generated stub for json_add_amount_sat_msat */
-void json_add_amount_sat_msat(struct json_stream *result UNNEEDED,
- const char *msatfieldname UNNEEDED,
- struct amount_sat sat)
-
-{ fprintf(stderr, "json_add_amount_sat_msat called!\n"); abort(); }
-/* Generated stub for json_add_bolt11 */
-void json_add_bolt11(struct json_stream *response UNNEEDED,
- const struct bolt11 *b11 UNNEEDED)
-{ fprintf(stderr, "json_add_bolt11 called!\n"); abort(); }
-/* Generated stub for json_add_bool */
-void json_add_bool(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- bool value UNNEEDED)
-{ fprintf(stderr, "json_add_bool called!\n"); abort(); }
-/* Generated stub for json_add_channel_type */
-void json_add_channel_type(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct channel_type *channel_type UNNEEDED)
-{ fprintf(stderr, "json_add_channel_type called!\n"); abort(); }
-/* Generated stub for json_add_escaped_string */
-void json_add_escaped_string(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct json_escape *esc TAKES UNNEEDED)
-{ fprintf(stderr, "json_add_escaped_string called!\n"); abort(); }
-/* Generated stub for json_add_hex_talarr */
-void json_add_hex_talarr(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- const tal_t *data UNNEEDED)
-{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
-/* Generated stub for json_add_invstring */
-void json_add_invstring(struct json_stream *result UNNEEDED, const char *invstring UNNEEDED)
-{ fprintf(stderr, "json_add_invstring called!\n"); abort(); }
/* Generated stub for json_add_log */
void json_add_log(struct json_stream *result UNNEEDED,
const struct log_book *log_book UNNEEDED,
const struct node_id *node_id UNNEEDED,
enum log_level minlevel UNNEEDED)
{ fprintf(stderr, "json_add_log called!\n"); abort(); }
-/* Generated stub for json_add_node_id */
-void json_add_node_id(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "json_add_node_id called!\n"); abort(); }
-/* Generated stub for json_add_num */
-void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- unsigned int value UNNEEDED)
-{ fprintf(stderr, "json_add_num called!\n"); abort(); }
-/* Generated stub for json_add_preimage */
-void json_add_preimage(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- const struct preimage *preimage UNNEEDED)
-{ fprintf(stderr, "json_add_preimage called!\n"); abort(); }
-/* Generated stub for json_add_s64 */
-void json_add_s64(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- int64_t value UNNEEDED)
-{ fprintf(stderr, "json_add_s64 called!\n"); abort(); }
-/* Generated stub for json_add_secret */
-void json_add_secret(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct secret *secret UNNEEDED)
-{ fprintf(stderr, "json_add_secret called!\n"); abort(); }
-/* Generated stub for json_add_sha256 */
-void json_add_sha256(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- const struct sha256 *hash UNNEEDED)
-{ fprintf(stderr, "json_add_sha256 called!\n"); abort(); }
-/* Generated stub for json_add_short_channel_id */
-void json_add_short_channel_id(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- struct short_channel_id id UNNEEDED)
-{ fprintf(stderr, "json_add_short_channel_id called!\n"); abort(); }
-/* Generated stub for json_add_string */
-void json_add_string(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *str TAKES UNNEEDED)
-{ fprintf(stderr, "json_add_string called!\n"); abort(); }
-/* Generated stub for json_add_stringn */
-void json_add_stringn(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- const char *value TAKES UNNEEDED, size_t value_len UNNEEDED)
-{ fprintf(stderr, "json_add_stringn called!\n"); abort(); }
-/* Generated stub for json_add_timeiso */
-void json_add_timeiso(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- struct timeabs time UNNEEDED)
-{ fprintf(stderr, "json_add_timeiso called!\n"); abort(); }
-/* Generated stub for json_add_tx */
-void json_add_tx(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct bitcoin_tx *tx UNNEEDED)
-{ fprintf(stderr, "json_add_tx called!\n"); abort(); }
-/* Generated stub for json_add_txid */
-void json_add_txid(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- const struct bitcoin_txid *txid UNNEEDED)
-{ fprintf(stderr, "json_add_txid called!\n"); abort(); }
-/* Generated stub for json_add_u32 */
-void json_add_u32(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- uint32_t value UNNEEDED)
-{ fprintf(stderr, "json_add_u32 called!\n"); abort(); }
-/* Generated stub for json_add_u64 */
-void json_add_u64(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- uint64_t value UNNEEDED)
-{ fprintf(stderr, "json_add_u64 called!\n"); abort(); }
/* Generated stub for json_add_uncommitted_channel */
void json_add_uncommitted_channel(struct command *cmd UNNEEDED,
struct json_stream *response UNNEEDED,
@@ -641,25 +431,6 @@ void json_add_unsaved_channel(struct command *cmd UNNEEDED,
const struct channel *channel UNNEEDED,
const struct peer *peer UNNEEDED)
{ fprintf(stderr, "json_add_unsaved_channel called!\n"); abort(); }
-/* Generated stub for json_array_end */
-void json_array_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_array_end called!\n"); abort(); }
-/* Generated stub for json_array_start */
-void json_array_start(struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_array_start called!\n"); abort(); }
-/* Generated stub for json_object_end */
-void json_object_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_object_end called!\n"); abort(); }
-/* Generated stub for json_object_start */
-void json_object_start(struct json_stream *ks UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_object_start called!\n"); abort(); }
-/* Generated stub for json_scan */
-const char *json_scan(const tal_t *ctx UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *guide UNNEEDED,
- ...)
-{ fprintf(stderr, "json_scan called!\n"); abort(); }
/* Generated stub for json_stream_fail */
struct json_stream *json_stream_fail(struct command *cmd UNNEEDED,
enum jsonrpc_errcode code UNNEEDED,
@@ -668,39 +439,6 @@ struct json_stream *json_stream_fail(struct command *cmd UNNEEDED,
/* Generated stub for json_stream_success */
struct json_stream *json_stream_success(struct command *cmd UNNEEDED)
{ fprintf(stderr, "json_stream_success called!\n"); abort(); }
-/* Generated stub for json_to_address_scriptpubkey */
-enum address_parse_result json_to_address_scriptpubkey(const tal_t *ctx UNNEEDED,
- const struct chainparams *chainparams UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED, const u8 **scriptpubkey UNNEEDED)
-{ fprintf(stderr, "json_to_address_scriptpubkey called!\n"); abort(); }
-/* Generated stub for json_to_msat */
-bool json_to_msat(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct amount_msat *msat UNNEEDED)
-{ fprintf(stderr, "json_to_msat called!\n"); abort(); }
-/* Generated stub for json_to_node_id */
-bool json_to_node_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct node_id *id UNNEEDED)
-{ fprintf(stderr, "json_to_node_id called!\n"); abort(); }
-/* Generated stub for json_to_number */
-bool json_to_number(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- unsigned int *num UNNEEDED)
-{ fprintf(stderr, "json_to_number called!\n"); abort(); }
-/* Generated stub for json_to_short_channel_id */
-bool json_to_short_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct short_channel_id *scid UNNEEDED)
-{ fprintf(stderr, "json_to_short_channel_id called!\n"); abort(); }
-/* Generated stub for json_to_u16 */
-bool json_to_u16(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- uint16_t *num UNNEEDED)
-{ fprintf(stderr, "json_to_u16 called!\n"); abort(); }
-/* Generated stub for json_tok_bin_from_hex */
-u8 *json_tok_bin_from_hex(const tal_t *ctx UNNEEDED, const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED)
-{ fprintf(stderr, "json_tok_bin_from_hex called!\n"); abort(); }
-/* Generated stub for json_tok_channel_id */
-bool json_tok_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct channel_id *cid UNNEEDED)
-{ fprintf(stderr, "json_tok_channel_id called!\n"); abort(); }
/* Generated stub for jsonrpc_request_end */
void jsonrpc_request_end(struct jsonrpc_request *request UNNEEDED)
{ fprintf(stderr, "jsonrpc_request_end called!\n"); abort(); }
@@ -736,30 +474,9 @@ void log_(struct logger *logger UNNEEDED, enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "log_ called!\n"); abort(); }
-/* Generated stub for marginal_feerate */
-u32 marginal_feerate(u32 current_feerate UNNEEDED)
-{ fprintf(stderr, "marginal_feerate called!\n"); abort(); }
-/* Generated stub for merkle_tlv */
-void merkle_tlv(const struct tlv_field *fields UNNEEDED, struct sha256 *merkle UNNEEDED)
-{ fprintf(stderr, "merkle_tlv called!\n"); abort(); }
-/* Generated stub for new_bolt11 */
-struct bolt11 *new_bolt11(const tal_t *ctx UNNEEDED,
- const struct amount_msat *msat TAKES UNNEEDED)
-{ fprintf(stderr, "new_bolt11 called!\n"); abort(); }
-/* Generated stub for new_height_states */
-struct height_states *new_height_states(const tal_t *ctx UNNEEDED,
- enum side opener UNNEEDED,
- const u32 *blockheight UNNEEDED)
-{ fprintf(stderr, "new_height_states called!\n"); abort(); }
/* Generated stub for new_peer_fd */
struct peer_fd *new_peer_fd(const tal_t *ctx UNNEEDED, int peer_fd UNNEEDED)
{ fprintf(stderr, "new_peer_fd called!\n"); abort(); }
-/* Generated stub for new_reltimer_ */
-struct oneshot *new_reltimer_(struct timers *timers UNNEEDED,
- const tal_t *ctx UNNEEDED,
- struct timerel expire UNNEEDED,
- void (*cb)(void *) UNNEEDED, void *arg UNNEEDED)
-{ fprintf(stderr, "new_reltimer_ called!\n"); abort(); }
/* Generated stub for new_uncommitted_channel */
struct uncommitted_channel *new_uncommitted_channel(struct peer *peer UNNEEDED)
{ fprintf(stderr, "new_uncommitted_channel called!\n"); abort(); }
@@ -772,9 +489,6 @@ struct channel *new_unsaved_channel(struct peer *peer UNNEEDED,
bool newaddr_inner(struct command *cmd UNNEEDED, struct pubkey *pubkey UNNEEDED,
enum addrtype addrtype UNNEEDED)
{ fprintf(stderr, "newaddr_inner called!\n"); abort(); }
-/* Generated stub for node_id_cmp */
-int node_id_cmp(const struct node_id *a UNNEEDED, const struct node_id *b UNNEEDED)
-{ fprintf(stderr, "node_id_cmp called!\n"); abort(); }
/* Generated stub for notify_connect */
void notify_connect(struct lightningd *ld UNNEEDED,
const struct node_id *nodeid UNNEEDED,
@@ -802,55 +516,12 @@ enum watch_result onchaind_funding_spent(struct channel *channel UNNEEDED,
const struct bitcoin_tx *tx UNNEEDED,
u32 blockheight UNNEEDED)
{ fprintf(stderr, "onchaind_funding_spent called!\n"); abort(); }
-/* Generated stub for param */
-bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
- const jsmntok_t params[] UNNEEDED, ...)
-{ fprintf(stderr, "param called!\n"); abort(); }
-/* Generated stub for param_array */
-struct command_result *param_array(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- const jsmntok_t **arr UNNEEDED)
-{ fprintf(stderr, "param_array called!\n"); abort(); }
-/* Generated stub for param_bool */
-struct command_result *param_bool(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- bool **b UNNEEDED)
-{ fprintf(stderr, "param_bool called!\n"); abort(); }
-/* Generated stub for param_channel_id */
-struct command_result *param_channel_id(struct command *cmd UNNEEDED,
- const char *name UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- struct channel_id **cid UNNEEDED)
-{ fprintf(stderr, "param_channel_id called!\n"); abort(); }
-/* Generated stub for param_check */
-bool param_check(struct command *cmd UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t tokens[] UNNEEDED, ...)
-{ fprintf(stderr, "param_check called!\n"); abort(); }
-/* Generated stub for param_escaped_string */
-struct command_result *param_escaped_string(struct command *cmd UNNEEDED,
- const char *name UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char **str UNNEEDED)
-{ fprintf(stderr, "param_escaped_string called!\n"); abort(); }
/* Generated stub for param_index */
struct command_result *param_index(struct command *cmd UNNEEDED, const char *name UNNEEDED,
const char *buffer UNNEEDED,
const jsmntok_t *tok UNNEEDED,
enum wait_index **index UNNEEDED)
{ fprintf(stderr, "param_index called!\n"); abort(); }
-/* Generated stub for param_invstring */
-struct command_result *param_invstring(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- const char **str UNNEEDED)
-{ fprintf(stderr, "param_invstring called!\n"); abort(); }
-/* Generated stub for param_label */
-struct command_result *param_label(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct json_escape **label UNNEEDED)
-{ fprintf(stderr, "param_label called!\n"); abort(); }
/* Generated stub for param_loglevel */
struct command_result *param_loglevel(struct command *cmd UNNEEDED,
const char *name UNNEEDED,
@@ -858,50 +529,6 @@ struct command_result *param_loglevel(struct command *cmd UNNEEDED,
const jsmntok_t *tok UNNEEDED,
enum log_level **level UNNEEDED)
{ fprintf(stderr, "param_loglevel called!\n"); abort(); }
-/* Generated stub for param_msat */
-struct command_result *param_msat(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct amount_msat **msat UNNEEDED)
-{ fprintf(stderr, "param_msat called!\n"); abort(); }
-/* Generated stub for param_node_id */
-struct command_result *param_node_id(struct command *cmd UNNEEDED,
- const char *name UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- struct node_id **id UNNEEDED)
-{ fprintf(stderr, "param_node_id called!\n"); abort(); }
-/* Generated stub for param_number */
-struct command_result *param_number(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- unsigned int **num UNNEEDED)
-{ fprintf(stderr, "param_number called!\n"); abort(); }
-/* Generated stub for param_sha256 */
-struct command_result *param_sha256(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct sha256 **hash UNNEEDED)
-{ fprintf(stderr, "param_sha256 called!\n"); abort(); }
-/* Generated stub for param_short_channel_id */
-struct command_result *param_short_channel_id(struct command *cmd UNNEEDED,
- const char *name UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- struct short_channel_id **scid UNNEEDED)
-{ fprintf(stderr, "param_short_channel_id called!\n"); abort(); }
-/* Generated stub for param_string */
-struct command_result *param_string(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- const char **str UNNEEDED)
-{ fprintf(stderr, "param_string called!\n"); abort(); }
-/* Generated stub for param_u32 */
-struct command_result *param_u32(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- uint32_t **num UNNEEDED)
-{ fprintf(stderr, "param_u32 called!\n"); abort(); }
-/* Generated stub for param_u64 */
-struct command_result *param_u64(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- uint64_t **num UNNEEDED)
-{ fprintf(stderr, "param_u64 called!\n"); abort(); }
/* Generated stub for peer_any_channel_bystate */
struct channel *peer_any_channel_bystate(struct peer *peer UNNEEDED,
bool (*channel_state_filter)(enum channel_state) UNNEEDED,
@@ -937,9 +564,6 @@ bool plugin_hook_call_(struct lightningd *ld UNNEEDED,
void plugin_request_send(struct plugin *plugin UNNEEDED,
struct jsonrpc_request *req UNNEEDED)
{ fprintf(stderr, "plugin_request_send called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
/* Generated stub for report_subd_memleak */
void report_subd_memleak(struct leak_detect *leak_detect UNNEEDED, struct subd *leaker UNNEEDED)
{ fprintf(stderr, "report_subd_memleak called!\n"); abort(); }
@@ -947,14 +571,6 @@ void report_subd_memleak(struct leak_detect *leak_detect UNNEEDED, struct subd *
void resolve_close_command(struct lightningd *ld UNNEEDED, struct channel *channel UNNEEDED,
bool cooperative UNNEEDED, const struct bitcoin_tx **close_txs UNNEEDED)
{ fprintf(stderr, "resolve_close_command called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
-/* Generated stub for shachain_get_secret */
-bool shachain_get_secret(const struct shachain *shachain UNNEEDED,
- u64 commit_num UNNEEDED,
- struct secret *preimage UNNEEDED)
-{ fprintf(stderr, "shachain_get_secret called!\n"); abort(); }
/* Generated stub for start_leak_request */
void start_leak_request(const struct subd_req *req UNNEEDED,
struct leak_detect *leak_detect UNNEEDED)
@@ -973,15 +589,6 @@ void subd_send_fd(struct subd *sd UNNEEDED, int fd UNNEEDED)
/* Generated stub for subd_send_msg */
void subd_send_msg(struct subd *sd UNNEEDED, const u8 *msg_out UNNEEDED)
{ fprintf(stderr, "subd_send_msg called!\n"); abort(); }
-/* Generated stub for tlv_scb_tlvs_new */
-struct tlv_scb_tlvs *tlv_scb_tlvs_new(const tal_t *ctx UNNEEDED)
-{ fprintf(stderr, "tlv_scb_tlvs_new 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_channeld_dev_memleak */
u8 *towire_channeld_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_channeld_dev_memleak called!\n"); abort(); }
@@ -1000,11 +607,6 @@ u8 *towire_connectd_peer_send_msg(const tal_t *ctx UNNEEDED, const struct node_i
/* Generated stub for towire_dualopend_dev_memleak */
u8 *towire_dualopend_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_dualopend_dev_memleak called!\n"); abort(); }
-/* Generated stub for towire_errorfmt */
-u8 *towire_errorfmt(const tal_t *ctx UNNEEDED,
- const struct channel_id *channel UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "towire_errorfmt called!\n"); abort(); }
/* Generated stub for towire_hsmd_preapprove_invoice */
u8 *towire_hsmd_preapprove_invoice(const tal_t *ctx UNNEEDED, const wirestring *invstring UNNEEDED)
{ fprintf(stderr, "towire_hsmd_preapprove_invoice called!\n"); abort(); }
@@ -1026,26 +628,12 @@ u8 *towire_hsmd_sign_commitment_tx(const tal_t *ctx UNNEEDED, const struct node_
/* Generated stub for towire_hsmd_sign_invoice */
u8 *towire_hsmd_sign_invoice(const tal_t *ctx UNNEEDED, const u8 *u5bytes UNNEEDED, const u8 *hrp UNNEEDED)
{ fprintf(stderr, "towire_hsmd_sign_invoice called!\n"); abort(); }
-/* Generated stub for towire_modern_scb_chan */
-void towire_modern_scb_chan(u8 **p UNNEEDED, const struct modern_scb_chan *modern_scb_chan UNNEEDED)
-{ fprintf(stderr, "towire_modern_scb_chan 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(); }
/* Generated stub for towire_onchaind_dev_memleak */
u8 *towire_onchaind_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_onchaind_dev_memleak called!\n"); abort(); }
/* Generated stub for towire_openingd_dev_memleak */
u8 *towire_openingd_dev_memleak(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "towire_openingd_dev_memleak called!\n"); abort(); }
-/* Generated stub for towire_warningfmt */
-u8 *towire_warningfmt(const tal_t *ctx UNNEEDED,
- const struct channel_id *channel UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "towire_warningfmt called!\n"); abort(); }
-/* Generated stub for version */
-const char *version(void)
-{ fprintf(stderr, "version called!\n"); abort(); }
/* Generated stub for wallet_channel_save */
void wallet_channel_save(struct wallet *w UNNEEDED, struct channel *chan UNNEEDED)
{ fprintf(stderr, "wallet_channel_save called!\n"); abort(); }
diff --git a/lightningd/test/run-jsonrpc.c b/lightningd/test/run-jsonrpc.c
index cf064ca..c25cb53 100644
--- a/lightningd/test/run-jsonrpc.c
+++ b/lightningd/test/run-jsonrpc.c
@@ -8,13 +8,6 @@
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for command_fail_badparam */
-struct command_result *command_fail_badparam(struct command *cmd UNNEEDED,
- const char *paramname UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *msg UNNEEDED)
-{ fprintf(stderr, "command_fail_badparam called!\n"); abort(); }
/* Generated stub for db_begin_transaction_ */
void db_begin_transaction_(struct db *db UNNEEDED, const char *location UNNEEDED)
{ fprintf(stderr, "db_begin_transaction_ called!\n"); abort(); }
@@ -33,16 +26,6 @@ void fatal(const char *fmt UNNEEDED, ...)
/* Generated stub for feerate_for_deadline */
u32 feerate_for_deadline(const struct chain_topology *topo UNNEEDED, u32 blockcount UNNEEDED)
{ fprintf(stderr, "feerate_for_deadline 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 get_feerate_floor */
u32 get_feerate_floor(const struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "get_feerate_floor called!\n"); abort(); }
@@ -51,14 +34,6 @@ char *hsm_secret_arg(const tal_t *ctx UNNEEDED,
const char *arg UNNEEDED,
const u8 **hsm_secret UNNEEDED)
{ fprintf(stderr, "hsm_secret_arg called!\n"); abort(); }
-/* Generated stub for json_to_jsonrpc_errcode */
-bool json_to_jsonrpc_errcode(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- enum jsonrpc_errcode *errcode UNNEEDED)
-{ fprintf(stderr, "json_to_jsonrpc_errcode called!\n"); abort(); }
-/* Generated stub for json_to_number */
-bool json_to_number(const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- unsigned int *num UNNEEDED)
-{ fprintf(stderr, "json_to_number called!\n"); abort(); }
/* Generated stub for lightningd_deprecated_in_ok */
bool lightningd_deprecated_in_ok(struct lightningd *ld UNNEEDED,
struct logger *log UNNEEDED,
@@ -90,9 +65,6 @@ void log_io(struct logger *logger UNNEEDED, enum log_level dir UNNEEDED,
const char *comment UNNEEDED,
const void *data UNNEEDED, size_t len UNNEEDED)
{ fprintf(stderr, "log_io called!\n"); abort(); }
-/* Generated stub for log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
/* Generated stub for mutual_close_feerate */
u32 mutual_close_feerate(struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "mutual_close_feerate called!\n"); abort(); }
@@ -101,54 +73,9 @@ struct logger *new_logger(const tal_t *ctx UNNEEDED, struct log_book *record UNN
const struct node_id *default_node_id UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "new_logger called!\n"); abort(); }
-/* Generated stub for new_reltimer_ */
-struct oneshot *new_reltimer_(struct timers *timers UNNEEDED,
- const tal_t *ctx UNNEEDED,
- struct timerel expire UNNEEDED,
- void (*cb)(void *) UNNEEDED, void *arg UNNEEDED)
-{ fprintf(stderr, "new_reltimer_ called!\n"); abort(); }
/* Generated stub for opening_feerate */
u32 opening_feerate(struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "opening_feerate called!\n"); abort(); }
-/* Generated stub for param */
-bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
- const jsmntok_t params[] UNNEEDED, ...)
-{ fprintf(stderr, "param called!\n"); abort(); }
-/* Generated stub for param_bool */
-struct command_result *param_bool(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- bool **b UNNEEDED)
-{ fprintf(stderr, "param_bool called!\n"); abort(); }
-/* Generated stub for param_check */
-bool param_check(struct command *cmd UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t tokens[] UNNEEDED, ...)
-{ fprintf(stderr, "param_check called!\n"); abort(); }
-/* Generated stub for param_ignore */
-struct command_result *param_ignore(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- const void *unused UNNEEDED)
-{ fprintf(stderr, "param_ignore called!\n"); abort(); }
-/* Generated stub for param_number */
-struct command_result *param_number(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- unsigned int **num UNNEEDED)
-{ fprintf(stderr, "param_number called!\n"); abort(); }
-/* Generated stub for param_sha256 */
-struct command_result *param_sha256(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char *buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- struct sha256 **hash UNNEEDED)
-{ fprintf(stderr, "param_sha256 called!\n"); abort(); }
-/* Generated stub for param_string */
-struct command_result *param_string(struct command *cmd UNNEEDED, const char *name UNNEEDED,
- const char * buffer UNNEEDED, const jsmntok_t *tok UNNEEDED,
- const char **str UNNEEDED)
-{ fprintf(stderr, "param_string called!\n"); abort(); }
-/* Generated stub for param_subcommand */
-const char *param_subcommand(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
- const jsmntok_t tokens[] UNNEEDED,
- const char *name UNNEEDED, ...)
-{ fprintf(stderr, "param_subcommand called!\n"); abort(); }
/* Generated stub for penalty_feerate */
u32 penalty_feerate(struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "penalty_feerate called!\n"); abort(); }
@@ -158,30 +85,6 @@ bool plugin_hook_call_(struct lightningd *ld UNNEEDED,
const char *cmd_id TAKES UNNEEDED,
tal_t *cb_arg STEALS UNNEEDED)
{ fprintf(stderr, "plugin_hook_call_ called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
-/* Generated stub for trace_span_end */
-void trace_span_end(const void *key UNNEEDED)
-{ fprintf(stderr, "trace_span_end called!\n"); abort(); }
-/* Generated stub for trace_span_start_ */
-void trace_span_start_(const char *name UNNEEDED, const void *key UNNEEDED)
-{ fprintf(stderr, "trace_span_start_ called!\n"); abort(); }
-/* Generated stub for trace_span_tag */
-void trace_span_tag(const void *key UNNEEDED, const char *name UNNEEDED, const char *value UNNEEDED)
-{ fprintf(stderr, "trace_span_tag called!\n"); abort(); }
/* Generated stub for unilateral_feerate */
u32 unilateral_feerate(struct chain_topology *topo UNNEEDED, bool option_anchors UNNEEDED)
{ fprintf(stderr, "unilateral_feerate called!\n"); abort(); }
diff --git a/lightningd/test/run-log-pruning.c b/lightningd/test/run-log-pruning.c
index e20154e..893c707 100644
--- a/lightningd/test/run-log-pruning.c
+++ b/lightningd/test/run-log-pruning.c
@@ -4,75 +4,50 @@
#include <common/setup.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for command_fail_badparam */
-struct command_result *command_fail_badparam(struct command *cmd UNNEEDED,
- const char *paramname UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *msg UNNEEDED)
-{ fprintf(stderr, "command_fail_badparam called!\n"); abort(); }
+/* Generated stub for command_check_done */
+struct command_result *command_check_done(struct command *cmd)
+
+{ fprintf(stderr, "command_check_done called!\n"); abort(); }
+/* Generated stub for command_check_only */
+bool command_check_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_check_only called!\n"); abort(); }
+/* Generated stub for command_deprecated_in_ok */
+bool command_deprecated_in_ok(struct command *cmd UNNEEDED,
+ const char *param UNNEEDED,
+ const char *depr_start UNNEEDED,
+ const char *depr_end UNNEEDED)
+{ fprintf(stderr, "command_deprecated_in_ok called!\n"); abort(); }
+/* Generated stub for command_dev_apis */
+bool command_dev_apis(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_dev_apis called!\n"); abort(); }
+/* Generated stub for command_fail */
+struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_fail called!\n"); abort(); }
+/* Generated stub for command_filter_ptr */
+struct json_filter **command_filter_ptr(struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_filter_ptr called!\n"); abort(); }
+/* Generated stub for command_log */
+void command_log(struct command *cmd UNNEEDED, enum log_level level UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_log called!\n"); abort(); }
/* Generated stub for command_param_failed */
struct command_result *command_param_failed(void)
{ fprintf(stderr, "command_param_failed called!\n"); abort(); }
+/* Generated stub for command_set_usage */
+void command_set_usage(struct command *cmd UNNEEDED, const char *usage UNNEEDED)
+{ fprintf(stderr, "command_set_usage called!\n"); abort(); }
/* Generated stub for command_success */
struct command_result *command_success(struct command *cmd UNNEEDED,
struct json_stream *response)
{ fprintf(stderr, "command_success called!\n"); abort(); }
-/* Generated stub for fmt_node_id */
-char *fmt_node_id(const tal_t *ctx UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "fmt_node_id 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 json_add_hex_talarr */
-void json_add_hex_talarr(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- const tal_t *data UNNEEDED)
-{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
-/* Generated stub for json_add_node_id */
-void json_add_node_id(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "json_add_node_id called!\n"); abort(); }
-/* Generated stub for json_add_num */
-void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- unsigned int value UNNEEDED)
-{ fprintf(stderr, "json_add_num called!\n"); abort(); }
-/* Generated stub for json_add_str_fmt */
-void json_add_str_fmt(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "json_add_str_fmt called!\n"); abort(); }
-/* Generated stub for json_add_string */
-void json_add_string(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *str TAKES UNNEEDED)
-{ fprintf(stderr, "json_add_string called!\n"); abort(); }
-/* Generated stub for json_add_timestr */
-void json_add_timestr(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- struct timespec ts UNNEEDED)
-{ fprintf(stderr, "json_add_timestr called!\n"); abort(); }
-/* Generated stub for json_array_end */
-void json_array_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_array_end called!\n"); abort(); }
-/* Generated stub for json_array_start */
-void json_array_start(struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_array_start called!\n"); abort(); }
-/* Generated stub for json_object_end */
-void json_object_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_object_end called!\n"); abort(); }
-/* Generated stub for json_object_start */
-void json_object_start(struct json_stream *ks UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_object_start called!\n"); abort(); }
+/* Generated stub for command_usage_only */
+bool command_usage_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_usage_only called!\n"); abort(); }
/* Generated stub for json_stream_log_suppress_for_cmd */
void json_stream_log_suppress_for_cmd(struct json_stream *js UNNEEDED,
const struct command *cmd UNNEEDED)
@@ -80,38 +55,12 @@ void json_stream_log_suppress_for_cmd(struct json_stream *js UNNEEDED,
/* Generated stub for json_stream_success */
struct json_stream *json_stream_success(struct command *cmd UNNEEDED)
{ fprintf(stderr, "json_stream_success called!\n"); abort(); }
-/* Generated stub for log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
-/* Generated stub for log_level_parse */
-bool log_level_parse(const char *levelstr UNNEEDED, size_t len UNNEEDED,
- enum log_level *level UNNEEDED)
-{ fprintf(stderr, "log_level_parse called!\n"); abort(); }
/* Generated stub for notify_log */
void notify_log(struct lightningd *ld UNNEEDED, const struct log_entry *l UNNEEDED)
{ fprintf(stderr, "notify_log called!\n"); abort(); }
/* Generated stub for notify_warning */
void notify_warning(struct lightningd *ld UNNEEDED, struct log_entry *l UNNEEDED)
{ fprintf(stderr, "notify_warning called!\n"); abort(); }
-/* Generated stub for param */
-bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
- const jsmntok_t params[] UNNEEDED, ...)
-{ fprintf(stderr, "param called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/lightningd/test/run-log_filter.c b/lightningd/test/run-log_filter.c
index e39f589..b125865 100644
--- a/lightningd/test/run-log_filter.c
+++ b/lightningd/test/run-log_filter.c
@@ -15,69 +15,50 @@ void notify_log(struct lightningd *ld UNNEEDED, const struct log_entry *l UNNEED
{ }
/* AUTOGENERATED MOCKS START */
-/* Generated stub for command_fail_badparam */
-struct command_result *command_fail_badparam(struct command *cmd UNNEEDED,
- const char *paramname UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *msg UNNEEDED)
-{ fprintf(stderr, "command_fail_badparam called!\n"); abort(); }
+/* Generated stub for command_check_done */
+struct command_result *command_check_done(struct command *cmd)
+
+{ fprintf(stderr, "command_check_done called!\n"); abort(); }
+/* Generated stub for command_check_only */
+bool command_check_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_check_only called!\n"); abort(); }
+/* Generated stub for command_deprecated_in_ok */
+bool command_deprecated_in_ok(struct command *cmd UNNEEDED,
+ const char *param UNNEEDED,
+ const char *depr_start UNNEEDED,
+ const char *depr_end UNNEEDED)
+{ fprintf(stderr, "command_deprecated_in_ok called!\n"); abort(); }
+/* Generated stub for command_dev_apis */
+bool command_dev_apis(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_dev_apis called!\n"); abort(); }
+/* Generated stub for command_fail */
+struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_fail called!\n"); abort(); }
+/* Generated stub for command_filter_ptr */
+struct json_filter **command_filter_ptr(struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_filter_ptr called!\n"); abort(); }
+/* Generated stub for command_log */
+void command_log(struct command *cmd UNNEEDED, enum log_level level UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_log called!\n"); abort(); }
/* Generated stub for command_param_failed */
struct command_result *command_param_failed(void)
{ fprintf(stderr, "command_param_failed called!\n"); abort(); }
+/* Generated stub for command_set_usage */
+void command_set_usage(struct command *cmd UNNEEDED, const char *usage UNNEEDED)
+{ fprintf(stderr, "command_set_usage called!\n"); abort(); }
/* Generated stub for command_success */
struct command_result *command_success(struct command *cmd UNNEEDED,
struct json_stream *response)
{ fprintf(stderr, "command_success 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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 json_add_hex_talarr */
-void json_add_hex_talarr(struct json_stream *result UNNEEDED,
- const char *fieldname UNNEEDED,
- const tal_t *data UNNEEDED)
-{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
-/* Generated stub for json_add_node_id */
-void json_add_node_id(struct json_stream *response UNNEEDED,
- const char *fieldname UNNEEDED,
- const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "json_add_node_id called!\n"); abort(); }
-/* Generated stub for json_add_num */
-void json_add_num(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- unsigned int value UNNEEDED)
-{ fprintf(stderr, "json_add_num called!\n"); abort(); }
-/* Generated stub for json_add_str_fmt */
-void json_add_str_fmt(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "json_add_str_fmt called!\n"); abort(); }
-/* Generated stub for json_add_string */
-void json_add_string(struct json_stream *js UNNEEDED,
- const char *fieldname UNNEEDED,
- const char *str TAKES UNNEEDED)
-{ fprintf(stderr, "json_add_string called!\n"); abort(); }
-/* Generated stub for json_add_timestr */
-void json_add_timestr(struct json_stream *result UNNEEDED, const char *fieldname UNNEEDED,
- struct timespec ts UNNEEDED)
-{ fprintf(stderr, "json_add_timestr called!\n"); abort(); }
-/* Generated stub for json_array_end */
-void json_array_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_array_end called!\n"); abort(); }
-/* Generated stub for json_array_start */
-void json_array_start(struct json_stream *js UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_array_start called!\n"); abort(); }
-/* Generated stub for json_object_end */
-void json_object_end(struct json_stream *js UNNEEDED)
-{ fprintf(stderr, "json_object_end called!\n"); abort(); }
-/* Generated stub for json_object_start */
-void json_object_start(struct json_stream *ks UNNEEDED, const char *fieldname UNNEEDED)
-{ fprintf(stderr, "json_object_start called!\n"); abort(); }
+/* Generated stub for command_usage_only */
+bool command_usage_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_usage_only called!\n"); abort(); }
/* Generated stub for json_stream_log_suppress_for_cmd */
void json_stream_log_suppress_for_cmd(struct json_stream *js UNNEEDED,
const struct command *cmd UNNEEDED)
@@ -88,19 +69,6 @@ struct json_stream *json_stream_success(struct command *cmd UNNEEDED)
/* Generated stub for notify_warning */
void notify_warning(struct lightningd *ld UNNEEDED, struct log_entry *l UNNEEDED)
{ fprintf(stderr, "notify_warning called!\n"); abort(); }
-/* Generated stub for param */
-bool param(struct command *cmd UNNEEDED, const char *buffer UNNEEDED,
- const jsmntok_t params[] UNNEEDED, ...)
-{ fprintf(stderr, "param called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace 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(); }
/* AUTOGENERATED MOCKS END */
static size_t num_written;
diff --git a/lightningd/test/run-shuffle_fds.c b/lightningd/test/run-shuffle_fds.c
index 9067608..6fce2f8 100644
--- a/lightningd/test/run-shuffle_fds.c
+++ b/lightningd/test/run-shuffle_fds.c
@@ -54,28 +54,6 @@ bool db_in_transaction(struct db *db UNNEEDED)
/* Generated stub for fatal */
void fatal(const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "fatal 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(); }
-/* Generated stub for fromwire_channel_id */
-bool 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_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 fromwire_status_fail */
-bool fromwire_status_fail(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, enum status_failreason *failreason UNNEEDED, wirestring **desc UNNEEDED)
-{ fprintf(stderr, "fromwire_status_fail called!\n"); abort(); }
-/* Generated stub for fromwire_status_peer_billboard */
-bool fromwire_status_peer_billboard(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, bool *perm UNNEEDED, wirestring **happenings UNNEEDED)
-{ fprintf(stderr, "fromwire_status_peer_billboard called!\n"); abort(); }
-/* Generated stub for fromwire_status_peer_error */
-bool fromwire_status_peer_error(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, bool *disconnect UNNEEDED, wirestring **desc UNNEEDED, bool *warning UNNEEDED, u8 **error_for_them UNNEEDED)
-{ fprintf(stderr, "fromwire_status_peer_error called!\n"); abort(); }
-/* Generated stub for fromwire_status_version */
-bool fromwire_status_version(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, wirestring **version UNNEEDED)
-{ fprintf(stderr, "fromwire_status_version called!\n"); abort(); }
/* Generated stub for log_ */
void log_(struct logger *logger UNNEEDED, enum log_level level UNNEEDED,
const struct node_id *node_id UNNEEDED,
@@ -105,27 +83,9 @@ struct logger *new_logger(const tal_t *ctx UNNEEDED, struct log_book *record UNN
/* Generated stub for new_peer_fd_arr */
struct peer_fd *new_peer_fd_arr(const tal_t *ctx UNNEEDED, const int *fd UNNEEDED)
{ fprintf(stderr, "new_peer_fd_arr called!\n"); abort(); }
-/* Generated stub for pubkey_from_node_id */
-bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
-/* Generated stub for send_backtrace */
-void send_backtrace(const char *why UNNEEDED)
-{ fprintf(stderr, "send_backtrace called!\n"); abort(); }
/* Generated stub for subdaemon_path */
const char *subdaemon_path(const tal_t *ctx UNNEEDED, const struct lightningd *ld UNNEEDED, const char *name UNNEEDED)
{ fprintf(stderr, "subdaemon_path 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_node_id */
-void towire_node_id(u8 **pptr UNNEEDED, const struct node_id *id UNNEEDED)
-{ fprintf(stderr, "towire_node_id called!\n"); abort(); }
-/* Generated stub for version */
-const char *version(void)
-{ fprintf(stderr, "version called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static void run_test_(int fd0, ...)
diff --git a/onchaind/Makefile b/onchaind/Makefile
index 8ef57d9..b64cd0d 100644
--- a/onchaind/Makefile
+++ b/onchaind/Makefile
@@ -29,43 +29,6 @@ LIGHTNINGD_CONTROL_OBJS += \
onchaind/onchaind_wiregen.o \
onchaind/onchaind_wire.o
-# Common source we use.
-ONCHAIND_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bigsize.o \
- common/bip32.o \
- common/coin_mvt.o \
- common/channel_id.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/derive_basepoints.o \
- common/status_wiregen.o \
- common/htlc_tx.o \
- common/htlc_wire.o \
- common/initial_commit_tx.o \
- common/keyset.o \
- common/key_derive.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/peer_billboard.o \
- common/permute_tx.o \
- common/psbt_keypath.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/setup.o \
- common/status.o \
- common/status_wire.o \
- common/subdaemon.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wallet.o \
- common/wireaddr.o
-
-lightningd/lightning_onchaind: $(ONCHAIND_OBJS) $(WIRE_ONION_OBJS) $(ONCHAIND_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
+lightningd/lightning_onchaind: $(ONCHAIND_OBJS) $(HSMD_CLIENT_OBJS) libcommon.a
include onchaind/test/Makefile
diff --git a/onchaind/test/Makefile b/onchaind/test/Makefile
index 6777cb1..b776ea1 100644
--- a/onchaind/test/Makefile
+++ b/onchaind/test/Makefile
@@ -9,7 +9,13 @@ ONCHAIND_TEST_PROGRAMS := $(ONCHAIND_TEST_OBJS:.o=)
ALL_C_SOURCES += $(ONCHAIND_TEST_SRC)
ALL_TEST_PROGRAMS += $(ONCHAIND_TEST_PROGRAMS)
-ONCHAIND_TEST_COMMON_OBJS := \
+# test/run-grind_feerate-bug uses its own htlc_timeout_tx()
+$(filter-out onchaind/test/run-grind_feerate-bug,$(ONCHAIND_TEST_PROGRAMS)): libcommon.a
+
+onchaind/test/run-grind_feerate-bug: \
+ $(BITCOIN_OBJS) \
+ wire/towire.o \
+ wire/fromwire.o \
common/amount.o \
common/autodata.o \
common/features.o \
@@ -18,25 +24,8 @@ ONCHAIND_TEST_COMMON_OBJS := \
common/setup.o \
common/utils.o
-$(ONCHAIND_TEST_PROGRAMS): $(ONCHAIND_TEST_COMMON_OBJS) $(BITCOIN_OBJS)
-
-# This needs many more objs:
-onchaind/test/run-onchainstress: \
- common/htlc_tx.o \
- common/derive_basepoints.o \
- common/daemon.o \
- common/htlc_wire.o \
- common/initial_commit_tx.o \
- common/key_derive.o \
- common/keyset.o \
- common/permute_tx.o \
- common/subdaemon.o \
- common/wallet.o \
- wire/towire.o \
- wire/fromwire.o
-
# Test objects depend on ../ src and headers.
-$(ONCHAIND_TEST_OBJS): $(ONCHAIND_HEADERS) $(ONCHAIND_SRC)
+$(ONCHAIND_TEST_OBJS): $(ONCHAIND_HEADERS) $(ONCHAIND_SRC) onchaind/test/Makefile
onchaind-tests: $(ONCHAIND_TEST_PROGRAMS:%=unittest/%)
diff --git a/onchaind/test/run-grind_feerate-bug.c b/onchaind/test/run-grind_feerate-bug.c
index ff5ab45..ba71992 100644
--- a/onchaind/test/run-grind_feerate-bug.c
+++ b/onchaind/test/run-grind_feerate-bug.c
@@ -12,8 +12,6 @@ int test_main(int argc, char *argv[]);
#include "../onchaind.c"
#undef main
#include "../onchaind_wiregen.c"
-#include "wire/fromwire.c"
-#include "wire/towire.c"
/* AUTOGENERATED MOCKS START */
/* Generated stub for commit_number_obscurer */
diff --git a/onchaind/test/run-grind_feerate.c b/onchaind/test/run-grind_feerate.c
index e413f10..7593313 100644
--- a/onchaind/test/run-grind_feerate.c
+++ b/onchaind/test/run-grind_feerate.c
@@ -15,34 +15,6 @@ int main(int argc, char *argv[]);
#undef main
/* AUTOGENERATED MOCKS START */
-/* Generated stub for commit_number_obscurer */
-u64 commit_number_obscurer(const struct pubkey *opener_payment_basepoint UNNEEDED,
- const struct pubkey *accepter_payment_basepoint UNNEEDED)
-{ fprintf(stderr, "commit_number_obscurer called!\n"); abort(); }
-/* Generated stub for daemon_shutdown */
-void daemon_shutdown(void)
-{ fprintf(stderr, "daemon_shutdown called!\n"); abort(); }
-/* Generated stub for derive_keyset */
-bool derive_keyset(const struct pubkey *per_commitment_point UNNEEDED,
- const struct basepoints *self UNNEEDED,
- const struct basepoints *other UNNEEDED,
- bool option_static_remotekey UNNEEDED,
- struct keyset *keyset UNNEEDED)
-{ fprintf(stderr, "derive_keyset called!\n"); abort(); }
-/* Generated stub for dump_memleak_ */
-bool dump_memleak_(struct htable *memtable UNNEEDED,
- void (*print)(void *arg UNNEEDED, const char *fmt UNNEEDED, ...) UNNEEDED,
- void *arg UNNEEDED)
-{ fprintf(stderr, "dump_memleak_ called!\n"); abort(); }
-/* 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_bool */
-bool fromwire_bool(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_bool 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_hsmd_get_per_commitment_point_reply */
bool fromwire_hsmd_get_per_commitment_point_reply(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct pubkey *per_commitment_point UNNEEDED, struct secret **old_commitment_secret UNNEEDED)
{ fprintf(stderr, "fromwire_hsmd_get_per_commitment_point_reply called!\n"); abort(); }
@@ -67,198 +39,9 @@ bool fromwire_onchaind_spend_created(const tal_t *ctx UNNEEDED, const void *p UN
/* Generated stub for fromwire_onchaind_spent */
bool fromwire_onchaind_spent(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct tx_parts **tx UNNEEDED, u32 *input_num UNNEEDED, u32 *blockheight UNNEEDED)
{ fprintf(stderr, "fromwire_onchaind_spent called!\n"); abort(); }
-/* Generated stub for fromwire_peektype */
-int fromwire_peektype(const u8 *cursor UNNEEDED)
-{ fprintf(stderr, "fromwire_peektype called!\n"); abort(); }
-/* Generated stub for fromwire_secp256k1_ecdsa_signature */
-void fromwire_secp256k1_ecdsa_signature(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
- secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "fromwire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for fromwire_u64 */
-u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
-/* Generated stub for fromwire_u8 */
-u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
-{ fprintf(stderr, "fromwire_u8 called!\n"); abort(); }
-/* Generated stub for fromwire_u8_array */
-void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
-/* Generated stub for htlc_offered_wscript */
-u8 *htlc_offered_wscript(const tal_t *ctx UNNEEDED,
- const struct ripemd160 *ripemd UNNEEDED,
- const struct keyset *keyset UNNEEDED,
- bool option_anchor_outputs UNNEEDED,
- bool option_anchors_zero_fee_htlc_tx UNNEEDED)
-{ fprintf(stderr, "htlc_offered_wscript called!\n"); abort(); }
-/* Generated stub for htlc_received_wscript */
-u8 *htlc_received_wscript(const tal_t *ctx UNNEEDED,
- const struct ripemd160 *ripemd UNNEEDED,
- const struct abs_locktime *expiry UNNEEDED,
- const struct keyset *keyset UNNEEDED,
- bool option_anchor_outputs UNNEEDED,
- bool option_anchors_zero_fee_htlc_tx UNNEEDED)
-{ fprintf(stderr, "htlc_received_wscript called!\n"); abort(); }
-/* Generated stub for htlc_success_tx */
-struct bitcoin_tx *htlc_success_tx(const tal_t *ctx UNNEEDED,
- const struct chainparams *chainparams UNNEEDED,
- const struct bitcoin_outpoint *commit UNNEEDED,
- const u8 *commit_wscript UNNEEDED,
- struct amount_msat htlc_msatoshi UNNEEDED,
- u16 to_self_delay UNNEEDED,
- u32 feerate_per_kw UNNEEDED,
- const struct keyset *keyset UNNEEDED,
- bool option_anchor_outputs UNNEEDED,
- bool option_anchors_zero_fee_htlc_tx UNNEEDED)
-{ fprintf(stderr, "htlc_success_tx called!\n"); abort(); }
-/* Generated stub for htlc_timeout_tx */
-struct bitcoin_tx *htlc_timeout_tx(const tal_t *ctx UNNEEDED,
- const struct chainparams *chainparams UNNEEDED,
- const struct bitcoin_outpoint *commit UNNEEDED,
- const u8 *commit_wscript UNNEEDED,
- struct amount_msat htlc_msatoshi UNNEEDED,
- u32 cltv_expiry UNNEEDED,
- u16 to_self_delay UNNEEDED,
- u32 feerate_per_kw UNNEEDED,
- const struct keyset *keyset UNNEEDED,
- bool option_anchor_outputs UNNEEDED,
- bool option_anchors_zero_fee_htlc_tx UNNEEDED)
-{ fprintf(stderr, "htlc_timeout_tx called!\n"); abort(); }
-/* Generated stub for master_badmsg */
-void master_badmsg(u32 type_expected UNNEEDED, const u8 *msg)
-{ fprintf(stderr, "master_badmsg called!\n"); abort(); }
-/* Generated stub for memleak_ptr */
-bool memleak_ptr(struct htable *memtable UNNEEDED, const void *p UNNEEDED)
-{ fprintf(stderr, "memleak_ptr called!\n"); abort(); }
-/* Generated stub for memleak_scan_obj */
-void memleak_scan_obj(struct htable *memtable UNNEEDED, const void *obj UNNEEDED)
-{ fprintf(stderr, "memleak_scan_obj called!\n"); abort(); }
-/* Generated stub for memleak_start */
-struct htable *memleak_start(const tal_t *ctx UNNEEDED)
-{ fprintf(stderr, "memleak_start called!\n"); abort(); }
-/* Generated stub for memleak_status_broken */
-void memleak_status_broken(void *unused UNNEEDED, const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "memleak_status_broken called!\n"); abort(); }
-/* Generated stub for mk_mvt_tags_ */
-struct mvt_tags mk_mvt_tags_(enum mvt_tag tag UNNEEDED, ...)
-{ fprintf(stderr, "mk_mvt_tags_ called!\n"); abort(); }
-/* Generated stub for new_coin_channel_close */
-struct chain_coin_mvt *new_coin_channel_close(const tal_t *ctx UNNEEDED,
- const struct channel *channel UNNEEDED,
- const char *alt_account UNNEEDED,
- const struct bitcoin_txid *txid UNNEEDED,
- const struct bitcoin_outpoint *out UNNEEDED,
- u32 blockheight UNNEEDED,
- const struct amount_msat amount UNNEEDED,
- const struct amount_sat output_val UNNEEDED,
- u32 output_count UNNEEDED,
- bool is_splice)
-
-{ fprintf(stderr, "new_coin_channel_close called!\n"); abort(); }
-/* Generated stub for new_coin_external_deposit */
-struct chain_coin_mvt *new_coin_external_deposit(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- struct mvt_tags tags)
-
-{ fprintf(stderr, "new_coin_external_deposit called!\n"); abort(); }
-/* Generated stub for new_coin_external_spend */
-struct chain_coin_mvt *new_coin_external_spend(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- const struct bitcoin_txid *txid UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- struct mvt_tags tags)
-
-{ fprintf(stderr, "new_coin_external_spend called!\n"); abort(); }
-/* Generated stub for new_onchain_htlc_deposit */
-struct chain_coin_mvt *new_onchain_htlc_deposit(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- const struct sha256 *payment_hash)
-
-{ fprintf(stderr, "new_onchain_htlc_deposit called!\n"); abort(); }
-/* Generated stub for new_onchain_htlc_withdraw */
-struct chain_coin_mvt *new_onchain_htlc_withdraw(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- const struct sha256 *payment_hash)
-
-{ fprintf(stderr, "new_onchain_htlc_withdraw called!\n"); abort(); }
-/* Generated stub for new_onchaind_deposit */
-struct chain_coin_mvt *new_onchaind_deposit(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- struct mvt_tags tags)
-
-{ fprintf(stderr, "new_onchaind_deposit called!\n"); abort(); }
-/* Generated stub for new_onchaind_withdraw */
-struct chain_coin_mvt *new_onchaind_withdraw(const tal_t *ctx UNNEEDED,
- const struct bitcoin_outpoint *outpoint UNNEEDED,
- const struct bitcoin_txid *spend_txid UNNEEDED,
- u32 blockheight UNNEEDED,
- struct amount_sat amount UNNEEDED,
- struct mvt_tags tags)
-
-{ fprintf(stderr, "new_onchaind_withdraw called!\n"); abort(); }
-/* Generated stub for notleak_ */
-void *notleak_(void *ptr UNNEEDED, bool plus_children UNNEEDED)
-{ fprintf(stderr, "notleak_ called!\n"); abort(); }
/* Generated stub for onchaind_wire_name */
const char *onchaind_wire_name(int e UNNEEDED)
{ fprintf(stderr, "onchaind_wire_name called!\n"); abort(); }
-/* Generated stub for peer_billboard */
-void peer_billboard(bool perm UNNEEDED, const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "peer_billboard called!\n"); abort(); }
-/* Generated stub for shachain_get_secret */
-bool shachain_get_secret(const struct shachain *shachain UNNEEDED,
- u64 commit_num UNNEEDED,
- struct secret *preimage UNNEEDED)
-{ fprintf(stderr, "shachain_get_secret called!\n"); abort(); }
-/* Generated stub for status_failed */
-void status_failed(enum status_failreason code UNNEEDED,
- const char *fmt UNNEEDED, ...)
-{ fprintf(stderr, "status_failed called!\n"); abort(); }
-/* Generated stub for status_fmt */
-void status_fmt(enum log_level level UNNEEDED,
- const struct node_id *peer UNNEEDED,
- const char *fmt UNNEEDED, ...)
-
-{ fprintf(stderr, "status_fmt called!\n"); abort(); }
-/* Generated stub for status_setup_sync */
-void status_setup_sync(int fd UNNEEDED)
-{ fprintf(stderr, "status_setup_sync called!\n"); abort(); }
-/* Generated stub for subdaemon_setup */
-bool subdaemon_setup(int argc UNNEEDED, char *argv[])
-{ fprintf(stderr, "subdaemon_setup called!\n"); abort(); }
-/* Generated stub for to_self_wscript */
-u8 *to_self_wscript(const tal_t *ctx UNNEEDED,
- u16 to_self_delay UNNEEDED,
- u32 csv UNNEEDED,
- const struct keyset *keyset UNNEEDED)
-{ fprintf(stderr, "to_self_wscript 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_bool */
-void towire_bool(u8 **pptr UNNEEDED, bool v UNNEEDED)
-{ fprintf(stderr, "towire_bool called!\n"); abort(); }
/* Generated stub for towire_hsmd_get_per_commitment_point */
u8 *towire_hsmd_get_per_commitment_point(const tal_t *ctx UNNEEDED, u64 n UNNEEDED)
{ fprintf(stderr, "towire_hsmd_get_per_commitment_point called!\n"); abort(); }
@@ -316,34 +99,6 @@ u8 *towire_onchaind_spend_to_us(const tal_t *ctx UNNEEDED, const struct bitcoin_
/* Generated stub for towire_onchaind_spent_reply */
u8 *towire_onchaind_spent_reply(const tal_t *ctx UNNEEDED, bool interested UNNEEDED)
{ fprintf(stderr, "towire_onchaind_spent_reply called!\n"); abort(); }
-/* Generated stub for towire_secp256k1_ecdsa_signature */
-void towire_secp256k1_ecdsa_signature(u8 **pptr UNNEEDED,
- const secp256k1_ecdsa_signature *signature UNNEEDED)
-{ fprintf(stderr, "towire_secp256k1_ecdsa_signature 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(); }
-/* Generated stub for towire_u64 */
-void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
-{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
-/* Generated stub for towire_u8 */
-void towire_u8(u8 **pptr UNNEEDED, u8 v UNNEEDED)
-{ fprintf(stderr, "towire_u8 called!\n"); abort(); }
-/* Generated stub for towire_u8_array */
-void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
-{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
-/* Generated stub for wire_sync_read */
-u8 *wire_sync_read(const tal_t *ctx UNNEEDED, int fd UNNEEDED)
-{ fprintf(stderr, "wire_sync_read called!\n"); abort(); }
-/* Generated stub for wire_sync_write */
-bool wire_sync_write(int fd UNNEEDED, const void *msg TAKES UNNEEDED)
-{ fprintf(stderr, "wire_sync_write called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/openingd/Makefile b/openingd/Makefile
index 57dc84e..b5a1c29 100644
--- a/openingd/Makefile
+++ b/openingd/Makefile
@@ -29,63 +29,8 @@ ALL_PROGRAMS += lightningd/lightning_openingd lightningd/lightning_dualopend
LIGHTNINGD_CONTROL_HEADERS += openingd/openingd_wiregen.h openingd/dualopend_wiregen.h
LIGHTNINGD_CONTROL_OBJS += openingd/openingd_wiregen.o openingd/dualopend_wiregen.o
-# Common source we use.
-OPENINGD_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/bigsize.o \
- common/billboard.o \
- common/bip32.o \
- common/blockheight_states.o \
- common/channel_config.o \
- common/channel_id.o \
- common/channel_type.o \
- common/cryptomsg.o \
- common/daemon.o \
- common/daemon_conn.o \
- common/derive_basepoints.o \
- common/features.o \
- common/fee_states.o \
- common/gossip_store.o \
- common/htlc_state.o \
- common/htlc_wire.o \
- common/initial_channel.o \
- common/initial_commit_tx.o \
- common/key_derive.o \
- common/keyset.o \
- common/lease_rates.o \
- common/memleak.o \
- common/msg_queue.o \
- common/node_id.o \
- common/onionreply.o \
- common/peer_billboard.o \
- common/peer_failed.o \
- common/peer_io.o \
- common/peer_status_wiregen.o \
- common/penalty_base.o \
- common/per_peer_state.o \
- common/permute_tx.o \
- common/ping.o \
- common/psbt_internal.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/read_peer_msg.o \
- common/setup.o \
- common/shutdown_scriptpubkey.o \
- common/status.o \
- common/status_wire.o \
- common/status_wiregen.o \
- common/subdaemon.o \
- common/tx_roles.o \
- common/utils.o \
- common/utxo.o \
- common/version.o \
- common/wire_error.o \
- common/wireaddr.o
+lightningd/lightning_openingd: $(OPENINGD_OBJS) $(HSMD_CLIENT_OBJS) libcommon.a
-lightningd/lightning_openingd: $(OPENINGD_OBJS) $(OPENINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
-
-lightningd/lightning_dualopend: $(DUALOPEND_OBJS) $(OPENINGD_COMMON_OBJS) $(WIRE_OBJS) $(BITCOIN_OBJS) $(HSMD_CLIENT_OBJS)
+lightningd/lightning_dualopend: $(DUALOPEND_OBJS) $(HSMD_CLIENT_OBJS) libcommon.a
-include openingd/test/Makefile
diff --git a/plugins/Makefile b/plugins/Makefile
index 96147d8..40b0779 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -23,8 +23,8 @@ PLUGIN_COMMANDO_OBJS := $(PLUGIN_COMMANDO_SRC:.c=.o)
PLUGIN_KEYSEND_SRC := plugins/keysend.c
PLUGIN_KEYSEND_OBJS := $(PLUGIN_KEYSEND_SRC:.c=.o)
-PLUGIN_LIB_SRC := plugins/libplugin.c common/trace.c
-PLUGIN_LIB_HEADER := plugins/libplugin.h common/trace.h
+PLUGIN_LIB_SRC := plugins/libplugin.c
+PLUGIN_LIB_HEADER := plugins/libplugin.h
PLUGIN_LIB_OBJS := $(PLUGIN_LIB_SRC:.c=.o)
PLUGIN_PAY_LIB_SRC := \
@@ -156,59 +156,6 @@ plugins/cln-bip353: $(RUST_TARGET_DIR)/cln-bip353
PLUGINS += plugins/cln-grpc plugins/clnrest plugins/cln-lsps-client plugins/cln-lsps-service plugins/wss-proxy plugins/cln-bip353
endif
-PLUGIN_COMMON_OBJS := \
- bitcoin/base58.o \
- bitcoin/block.o \
- bitcoin/chainparams.o \
- bitcoin/feerate.o \
- bitcoin/preimage.o \
- bitcoin/privkey.o \
- bitcoin/psbt.o \
- bitcoin/pubkey.o \
- bitcoin/script.o \
- bitcoin/shadouble.o \
- bitcoin/short_channel_id.o \
- bitcoin/signature.o \
- bitcoin/tx.o \
- bitcoin/varint.o \
- common/addr.o \
- common/amount.o \
- common/autodata.o \
- common/coin_mvt.o \
- common/base32.o \
- common/bech32.o \
- common/bech32_util.o \
- common/bigsize.o \
- common/bolt11.o \
- common/channel_id.o \
- common/daemon.o \
- common/deprecation.o \
- common/features.o \
- common/hash_u5.o \
- common/json_command.o \
- common/json_param.o \
- common/json_parse.o \
- common/json_parse_simple.o \
- common/json_filter.o \
- common/json_stream.o \
- common/lease_rates.o \
- common/memleak.o \
- common/node_id.o \
- common/plugin.o \
- common/psbt_open.o \
- common/pseudorand.o \
- common/random_select.o \
- common/splice_script.o \
- common/setup.o \
- common/status_levels.o \
- common/utils.o \
- common/version.o \
- common/wireaddr.o \
- wire/fromwire.o \
- wire/peer_wiregen.o \
- wire/tlvstream.o \
- wire/towire.o
-
include plugins/askrene/Makefile
include plugins/bkpr/Makefile
include plugins/renepay/Makefile
@@ -224,36 +171,36 @@ PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o)
# Make all plugins depend on all plugin headers, for simplicity.
$(PLUGIN_ALL_OBJS): $(PLUGIN_ALL_HEADER)
-plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12_wiregen.o bitcoin/block.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o common/sciddir_or_pubkey.o wire/onion_wiregen.o
+plugins/pay: $(PLUGIN_PAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/autoclean: $(PLUGIN_AUTOCLEAN_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/scb_wiregen.o wire/channel_type_wiregen.o common/htlc_wire.o common/onionreply.o common/derive_basepoints.o
+plugins/chanbackup: $(PLUGIN_chanbackup_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/commando: $(PLUGIN_COMMANDO_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
# 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/sciddir_or_pubkey.o common/fp16.o wire/peer_wiregen.o wire/channel_type_wiregen.o bitcoin/block.o bitcoin/preimage.o common/gossmods_listpeerchannels.o $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/topology: $(PLUGIN_TOPOLOGY_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/txprepare: $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/txprepare: $(PLUGIN_TXPREPARE_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/exposesecret: $(PLUGIN_EXPOSESECRET_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/hsm_encryption.o common/codex32.o
+plugins/exposesecret: $(PLUGIN_EXPOSESECRET_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/bcli: $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/bcli: $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/keysend: wire/tlvstream.o wire/onion_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossmap.o common/fp16.o common/route.o common/dijkstra.o common/blindedpay.o common/blindedpath.o common/hmac.o common/blinding.o common/onion_encode.o common/gossmods_listpeerchannels.o common/sciddir_or_pubkey.o
-$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
+plugins/keysend: $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(JSMN_OBJS) libcommon.a
+$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER) libcommon.a
-plugins/spenderp: bitcoin/block.o bitcoin/preimage.o bitcoin/psbt.o common/psbt_open.o common/json_channel_type.o common/channel_type.o common/features.o wire/peer_wiregen.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/spenderp: $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/offers: $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/addr.o common/bolt12.o common/bolt12_merkle.o common/bolt11_json.o common/iso4217.o $(WIRE_OBJS) $(WIRE_BOLT12_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o common/blindedpath.o common/bolt12_id.o common/blinding.o common/hmac.o common/json_blinded_path.o common/gossmap.o common/fp16.o $(JSMN_OBJS) common/dijkstra.o common/route.o common/gossmods_listpeerchannels.o common/onion_message.o common/sphinx.o common/onionreply.o
+plugins/offers: $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/funder: bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/funder: $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/recover: common/gossmap.o common/sciddir_or_pubkey.o common/fp16.o $(PLUGIN_RECOVER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/recover: $(PLUGIN_RECOVER_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
-plugins/recklessrpc: $(PLUGIN_RECKLESSRPC_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS)
+plugins/recklessrpc: $(PLUGIN_RECKLESSRPC_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
# This covers all the low-level list RPCs which return simple arrays
SQL_LISTRPCS := listchannels listforwards listhtlcs listinvoices listnodes listoffers listpeers listpeerchannels listclosedchannels listtransactions listsendpays listchainmoves listchannelmoves bkpr-listaccountevents bkpr-listincome
@@ -284,7 +231,7 @@ plugins/sql-schema_gen.h: $(SQL_SCHEMA_PARTS)
)
plugins/sql.o: plugins/sql-schema_gen.h
-plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) common/gossip_store.o gossipd/gossip_store_wiregen.o
+plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) gossipd/gossip_store_wiregen.o libcommon.a
# Generated from PLUGINS definition in plugins/Makefile
ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h
diff --git a/plugins/askrene/Makefile b/plugins/askrene/Makefile
index a34442d..d10e79e 100644
--- a/plugins/askrene/Makefile
+++ b/plugins/askrene/Makefile
@@ -31,6 +31,6 @@ $(PLUGIN_ASKRENE_OBJS): $(PLUGIN_ASKRENE_HEADER)
PLUGIN_ALL_SRC += $(PLUGIN_ASKRENE_SRC)
PLUGIN_ALL_HEADER += $(PLUGIN_ASKRENE_HEADER)
-plugins/cln-askrene: $(PLUGIN_ASKRENE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/sciddir_or_pubkey.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o wire/bolt12_wiregen.o wire/onion_wiregen.o common/route.o
+plugins/cln-askrene: $(PLUGIN_ASKRENE_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) libcommon.a
include plugins/askrene/test/Makefile
diff --git a/plugins/askrene/test/Makefile b/plugins/askrene/test/Makefile
index 88ee0b8..5759475 100644
--- a/plugins/askrene/test/Makefile
+++ b/plugins/askrene/test/Makefile
@@ -6,15 +6,13 @@ PLUGIN_ASKRENE_TEST_PROGRAMS := $(PLUGIN_ASKRENE_TEST_OBJS:.o=)
ALL_C_SOURCES += $(PLUGIN_ASKRENE_TEST_SRC)
ALL_TEST_PROGRAMS += $(PLUGIN_ASKRENE_TEST_PROGRAMS)
-$(PLUGIN_RENEPAY_TEST_OBJS): $(PLUGIN_ASKRENE_SRC)
-
-PLUGIN_ASKRENE_TEST_COMMON_OBJS :=
+$(PLUGIN_RENEPAY_TEST_OBJS): $(PLUGIN_ASKRENE_SRC) plugins/askrene/test/Makefile
plugins/askrene/test/run-bfs plugins/askrene/test/run-dijkstra plugins/askrene/test/run-flow plugins/askrene/test/run-mcf plugins/askrene/test/run-mcf-large: \
plugins/askrene/priorityqueue.o \
plugins/askrene/graph.o
-$(PLUGIN_ASKRENE_TEST_PROGRAMS): $(PLUGIN_ASKRENE_TEST_COMMON_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
+$(PLUGIN_ASKRENE_TEST_PROGRAMS): $(PLUGIN_LIB_OBJS) libcommon.a
check-askrene: $(PLUGIN_ASKRENE_TEST_PROGRAMS:%=unittest/%)
diff --git a/plugins/bkpr/Makefile b/plugins/bkpr/Makefile
index 943b875..0647a54 100644
--- a/plugins/bkpr/Makefile
+++ b/plugins/bkpr/Makefile
@@ -40,7 +40,7 @@ PLUGIN_ALL_HEADER += $(BOOKKEEPER_HEADER)
C_PLUGINS += plugins/bookkeeper
PLUGINS += plugins/bookkeeper
-plugins/bookkeeper: common/bolt12.o common/bolt12_merkle.o common/channel_type.o $(BOOKKEEPER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(WIRE_OBJS) $(WIRE_BOLT12_OBJS)
+plugins/bookkeeper: $(BOOKKEEPER_OBJS) $(PLUGIN_LIB_OBJS) libcommon.a
maintainer-clean: clean
clean: bkpr-maintainer-clean
diff --git a/plugins/bkpr/test/Makefile b/plugins/bkpr/test/Makefile
index 80fed18..c28bc00 100644
--- a/plugins/bkpr/test/Makefile
+++ b/plugins/bkpr/test/Makefile
@@ -5,34 +5,7 @@ BOOKKEEPER_TEST_PROGRAMS := $(BOOKKEEPER_TEST_OBJS:.o=)
ALL_C_SOURCES += $(BOOKKEEPER_TEST_SRC)
ALL_TEST_PROGRAMS += $(BOOKKEEPER_TEST_PROGRAMS)
-BOOKKEEPER_TEST_COMMON_OBJS := \
- common/amount.o \
- common/autodata.o \
- common/base32.o \
- common/blockheight_states.o \
- common/channel_type.o \
- common/coin_mvt.o \
- common/features.o \
- common/json_parse.o \
- common/json_stream.o \
- common/json_parse_simple.o \
- common/key_derive.o \
- common/memleak.o \
- common/node_id.o \
- common/pseudorand.o \
- common/setup.o \
- common/trace.o \
- common/timeout.o \
- common/utils.o \
- common/version.o \
- db/bindings.o \
- db/db_sqlite3.o \
- db/exec.o \
- db/utils.o \
- wire/towire.o \
- wire/fromwire.o
-
-$(BOOKKEEPER_TEST_PROGRAMS): $(BITCOIN_OBJS) $(BOOKKEEPER_TEST_COMMON_OBJS)
-$(BOOKKEEPER_TEST_OBJS): $(BOOKKEEPER_HEADER) $(BOOKKEEPER_SRC) $(BOOKKEEPER_TEST_COMMON_OBJS)
+$(BOOKKEEPER_TEST_PROGRAMS): libcommon.a
+$(BOOKKEEPER_TEST_OBJS): $(BOOKKEEPER_SRC) $(BOOKKEEPER_HEADER) plugins/bkpr/test/Makefile
check-units: $(BOOKKEEPER_TEST_PROGRAMS:%=unittest/%)
diff --git a/plugins/bkpr/test/run-recorder.c b/plugins/bkpr/test/run-recorder.c
index da01849..bc2177e 100644
--- a/plugins/bkpr/test/run-recorder.c
+++ b/plugins/bkpr/test/run-recorder.c
@@ -46,37 +46,25 @@ const char *chain_event_description(const struct bkpr *bkpr UNNEEDED,
const char *channel_event_description(const struct bkpr *bkpr UNNEEDED,
const struct channel_event *ce UNNEEDED)
{ fprintf(stderr, "channel_event_description called!\n"); abort(); }
-/* Generated stub for command_fail_badparam */
-struct command_result *command_fail_badparam(struct command *cmd UNNEEDED,
- const char *paramname UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED,
- const char *msg UNNEEDED)
-{ fprintf(stderr, "command_fail_badparam called!\n"); abort(); }
+/* Generated stub for command_check_only */
+bool command_check_only(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_check_only called!\n"); abort(); }
+/* Generated stub for command_dev_apis */
+bool command_dev_apis(const struct command *cmd UNNEEDED)
+{ fprintf(stderr, "command_dev_apis called!\n"); abort(); }
+/* Generated stub for command_fail */
+struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_fail called!\n"); abort(); }
/* Generated stub for command_filter_ptr */
struct json_filter **command_filter_ptr(struct command *cmd UNNEEDED)
{ fprintf(stderr, "command_filter_ptr called!\n"); abort(); }
-/* Generated stub for first_fee_state */
-enum htlc_state first_fee_state(enum side opener UNNEEDED)
-{ fprintf(stderr, "first_fee_state called!\n"); abort(); }
-/* Generated stub for fmt_channel_id */
-char *fmt_channel_id(const tal_t *ctx UNNEEDED, const struct channel_id *channel_id UNNEEDED)
-{ fprintf(stderr, "fmt_channel_id called!\n"); abort(); }
-/* 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_wireaddr */
-bool fromwire_wireaddr(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct wireaddr *addr UNNEEDED)
-{ fprintf(stderr, "fromwire_wireaddr called!\n"); abort(); }
-/* Generated stub for htlc_state_flags */
-int htlc_state_flags(enum htlc_state state UNNEEDED)
-{ fprintf(stderr, "htlc_state_flags called!\n"); abort(); }
-/* Generated stub for htlc_state_name */
-const char *htlc_state_name(enum htlc_state s UNNEEDED)
-{ fprintf(stderr, "htlc_state_name called!\n"); abort(); }
-/* Generated stub for last_fee_state */
-enum htlc_state last_fee_state(enum side opener UNNEEDED)
-{ fprintf(stderr, "last_fee_state called!\n"); abort(); }
+/* Generated stub for command_log */
+void command_log(struct command *cmd UNNEEDED, enum log_level level UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_log called!\n"); abort(); }
/* Generated stub for plugin_err */
void plugin_err(struct plugin *p UNNEEDED, const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "plugin_err called!\n"); abort(); }
diff --git a/plugins/bkpr/test/run-sql.c b/plugins/bkpr/test/run-sql.c
index 8be5859..28da98b 100644
--- a/plugins/bkpr/test/run-sql.c
+++ b/plugins/bkpr/test/run-sql.c
@@ -12,69 +12,9 @@
#include <wire/wire.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for daemon_developer_mode */
-bool daemon_developer_mode(char *argv[])
-{ fprintf(stderr, "daemon_developer_mode called!\n"); abort(); }
-/* Generated stub for daemon_setup */
-void daemon_setup(const char *argv0 UNNEEDED,
- void (*backtrace_print)(const char *fmt UNNEEDED, ...) UNNEEDED,
- void (*backtrace_exit)(void))
-{ fprintf(stderr, "daemon_setup called!\n"); abort(); }
-/* Generated stub for deprecated_ok_ */
-bool deprecated_ok_(bool deprecated_apis UNNEEDED,
- const char *feature UNNEEDED,
- const char *start UNNEEDED,
- const char *end UNNEEDED,
- const char **begs UNNEEDED,
- void (*complain)(const char *feat UNNEEDED, bool allowing UNNEEDED, void *) UNNEEDED,
- void *cbarg UNNEEDED)
-{ fprintf(stderr, "deprecated_ok_ called!\n"); abort(); }
/* Generated stub for find_blockheight */
u32 find_blockheight(const struct bkpr *bkpr UNNEEDED, const struct bitcoin_txid *txid UNNEEDED)
{ fprintf(stderr, "find_blockheight called!\n"); abort(); }
-/* Generated stub for first_fee_state */
-enum htlc_state first_fee_state(enum side opener UNNEEDED)
-{ fprintf(stderr, "first_fee_state called!\n"); abort(); }
-/* Generated stub for fmt_channel_id */
-char *fmt_channel_id(const tal_t *ctx UNNEEDED, const struct channel_id *channel_id UNNEEDED)
-{ fprintf(stderr, "fmt_channel_id called!\n"); abort(); }
-/* 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_wireaddr */
-bool fromwire_wireaddr(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct wireaddr *addr UNNEEDED)
-{ fprintf(stderr, "fromwire_wireaddr called!\n"); abort(); }
-/* Generated stub for htlc_state_flags */
-int htlc_state_flags(enum htlc_state state UNNEEDED)
-{ fprintf(stderr, "htlc_state_flags called!\n"); abort(); }
-/* Generated stub for htlc_state_name */
-const char *htlc_state_name(enum htlc_state s UNNEEDED)
-{ fprintf(stderr, "htlc_state_name called!\n"); abort(); }
-/* Generated stub for is_asterix_notification */
-bool is_asterix_notification(const char *notification_name UNNEEDED,
- const char *subscriptions UNNEEDED)
-{ fprintf(stderr, "is_asterix_notification called!\n"); abort(); }
-/* Generated stub for json_filter_down */
-bool json_filter_down(struct json_filter **filter UNNEEDED, const char *member UNNEEDED)
-{ fprintf(stderr, "json_filter_down called!\n"); abort(); }
-/* Generated stub for json_filter_finished */
-bool json_filter_finished(const struct json_filter *filter UNNEEDED)
-{ fprintf(stderr, "json_filter_finished called!\n"); abort(); }
-/* Generated stub for json_filter_misused */
-const char *json_filter_misused(const tal_t *ctx UNNEEDED, const struct json_filter *f UNNEEDED)
-{ fprintf(stderr, "json_filter_misused called!\n"); abort(); }
-/* Generated stub for json_filter_ok */
-bool json_filter_ok(const struct json_filter *filter UNNEEDED, const char *member UNNEEDED)
-{ fprintf(stderr, "json_filter_ok called!\n"); abort(); }
-/* Generated stub for json_filter_up */
-bool json_filter_up(struct json_filter **filter UNNEEDED)
-{ fprintf(stderr, "json_filter_up called!\n"); abort(); }
-/* Generated stub for last_fee_state */
-enum htlc_state last_fee_state(enum side opener UNNEEDED)
-{ fprintf(stderr, "last_fee_state called!\n"); abort(); }
-/* Generated stub for log_level_name */
-const char *log_level_name(enum log_level level UNNEEDED)
-{ fprintf(stderr, "log_level_name called!\n"); abort(); }
/* Generated stub for new_channel_event */
struct channel_event *new_channel_event(const tal_t *ctx UNNEEDED,
const char *tag UNNEEDED,
@@ -85,17 +25,6 @@ struct channel_event *new_channel_event(const tal_t *ctx UNNEEDED,
u32 part_id UNNEEDED,
u64 timestamp UNNEEDED)
{ fprintf(stderr, "new_channel_event called!\n"); abort(); }
-/* Generated stub for param_check */
-bool param_check(struct command *cmd UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t tokens[] UNNEEDED, ...)
-{ fprintf(stderr, "param_check called!\n"); abort(); }
-/* Generated stub for parse_filter */
-struct command_result *parse_filter(struct command *cmd UNNEEDED,
- const char *name UNNEEDED,
- const char *buffer UNNEEDED,
- const jsmntok_t *tok UNNEEDED)
-{ fprintf(stderr, "parse_filter called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/plugins/renepay/Makefile b/plugins/renepay/Makefile
index 5300fec..455dab5 100644
--- a/plugins/renepay/Makefile
+++ b/plugins/renepay/Makefile
@@ -45,6 +45,6 @@ PLUGIN_ALL_HEADER += $(PLUGIN_RENEPAY_HDRS)
# Make all plugins depend on all plugin headers, for simplicity.
$(PLUGIN_RENEPAY_OBJS): $(PLUGIN_RENEPAY_HDRS)
-plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o common/sciddir_or_pubkey.o wire/bolt12_wiregen.o wire/onion_wiregen.o common/sphinx.o common/onion_encode.o common/hmac.o common/onionreply.o
+plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(JSMN_OBJS) libcommon.a
include plugins/renepay/test/Makefile
diff --git a/plugins/renepay/test/Makefile b/plugins/renepay/test/Makefile
index ba3c49b..2c86948 100644
--- a/plugins/renepay/test/Makefile
+++ b/plugins/renepay/test/Makefile
@@ -6,18 +6,13 @@ PLUGIN_RENEPAY_TEST_PROGRAMS := $(PLUGIN_RENEPAY_TEST_OBJS:.o=)
ALL_C_SOURCES += $(PLUGIN_RENEPAY_TEST_SRC)
ALL_TEST_PROGRAMS += $(PLUGIN_RENEPAY_TEST_PROGRAMS)
-$(PLUGIN_RENEPAY_TEST_OBJS): $(PLUGIN_RENEPAY_SRC) plugins/renepay/test/common.h
+$(PLUGIN_RENEPAY_TEST_OBJS): $(PLUGIN_RENEPAY_SRC) plugins/renepay/test/common.h plugins/renepay/test/Makefile
-PLUGIN_RENEPAY_TEST_COMMON_OBJS := \
+$(PLUGIN_RENEPAY_TEST_PROGRAMS): \
plugins/renepay/dijkstra.o \
plugins/renepay/chan_extra.o \
- bitcoin/chainparams.o \
- common/gossmap.o \
- common/fp16.o \
- common/dijkstra.o \
- gossipd/gossip_store_wiregen.o
-
-$(PLUGIN_RENEPAY_TEST_PROGRAMS): $(PLUGIN_RENEPAY_TEST_COMMON_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
+ gossipd/gossip_store_wiregen.o \
+ libcommon.a
check-renepay: $(PLUGIN_RENEPAY_TEST_PROGRAMS:%=unittest/%)
diff --git a/plugins/renepay/test/run-arc.c b/plugins/renepay/test/run-arc.c
index 793a0e7..8806508 100644
--- a/plugins/renepay/test/run-arc.c
+++ b/plugins/renepay/test/run-arc.c
@@ -14,10 +14,6 @@
#include "../mcf.c"
/* AUTOGENERATED MOCKS START */
-/* Generated stub for sciddir_or_pubkey_from_node_id */
-bool sciddir_or_pubkey_from_node_id(struct sciddir_or_pubkey *sciddpk UNNEEDED,
- const struct node_id *node_id UNNEEDED)
-{ fprintf(stderr, "sciddir_or_pubkey_from_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
diff --git a/plugins/renepay/test/run-bottleneck.c b/plugins/renepay/test/run-bottleneck.c
index f22d45f..6e8bda7 100644
--- a/plugins/renepay/test/run-bottleneck.c
+++ b/plugins/renepay/test/run-bottleneck.c
@@ -19,10 +19,6 @@
#include <sodium/randombytes.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for sciddir_or_pubkey_from_node_id */
-bool sciddir_or_pubkey_from_node_id(struct sciddir_or_pubkey *sciddpk UNNEEDED,
- const struct node_id *node_id UNNEEDED)
-{ fprintf(stderr, "sciddir_or_pubkey_from_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static u8 empty_map[] = {10};
diff --git a/plugins/renepay/test/run-dijkstra.c b/plugins/renepay/test/run-dijkstra.c
index 49e7a36..3c43b11 100644
--- a/plugins/renepay/test/run-dijkstra.c
+++ b/plugins/renepay/test/run-dijkstra.c
@@ -11,10 +11,6 @@
#include <plugins/renepay/dijkstra.h>
/* AUTOGENERATED MOCKS START */
-/* Generated stub for sciddir_or_pubkey_from_node_id */
-bool sciddir_or_pubkey_from_node_id(struct sciddir_or_pubkey *sciddpk UNNEEDED,
- const struct node_id *node_id UNNEEDED)
-{ fprintf(stderr, "sciddir_or_pubkey_from_node_id called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
static void insertion_in_increasing_distance(const tal_t *ctx)
diff --git a/plugins/renepay/test/run-mcf-diamond.c b/plugins/renepay/test/run-mcf-diamond.c
index 59eb997..d1471e3 100644
--- a/plugins/renepay/test/run-mcf-diamond.c
+++ b/plugins/renepay/test/run-mcf-diamond.c
@@ -18,6 +18,15 @@
#include <wire/onion_wiregen.h>
/* AUTOGENERATED MOCKS START */
+/* Generated stub for command_fail */
+struct command_result *command_fail(struct command *cmd UNNEEDED, enum jsonrpc_errcode code UNNEEDED,
+ const char *fmt UNNEEDED, ...)
+
+{ fprintf(stderr, "command_fail called!\n"); abort(); }
+/* Generated stub for command_finished */
+struct coWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.