diff --git a/common/Makefile b/common/Makefile index b62e738c0..c7139afc1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -26,7 +26,6 @@ COMMON_SRC_NOGEN := \ common/ecdh_hsmd.c \ common/features.c \ common/fee_states.c \ - common/funding_tx.c \ common/gossip_rcvd_filter.c \ common/gossip_store.c \ common/hash_u5.c \ diff --git a/common/funding_tx.c b/common/funding_tx.c deleted file mode 100644 index cc6111029..000000000 --- a/common/funding_tx.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "funding_tx.h" -#include -#include -#include -#include -#include -#include -#include - -#ifndef SUPERVERBOSE -#define SUPERVERBOSE(...) -#endif - -struct bitcoin_tx *funding_tx(const tal_t *ctx, - const struct chainparams *chainparams, - u16 *outnum, - const struct utxo **utxomap, - struct amount_sat funding, - const struct pubkey *local_fundingkey, - const struct pubkey *remote_fundingkey, - struct amount_sat change, - const struct pubkey *changekey, - const struct ext_key *bip32_base) -{ - u8 *wscript; - struct bitcoin_tx *tx; - bool has_change = !amount_sat_eq(change, AMOUNT_SAT(0)); - - tx = tx_spending_utxos(ctx, chainparams, utxomap, bip32_base, - has_change, 1, 0, BITCOIN_TX_DEFAULT_SEQUENCE); - - - wscript = bitcoin_redeem_2of2(tx, local_fundingkey, remote_fundingkey); - SUPERVERBOSE("# funding witness script = %s\n", - tal_hex(wscript, wscript)); - bitcoin_tx_add_output(tx, scriptpubkey_p2wsh(tx, wscript), wscript, funding); - tal_free(wscript); - - if (has_change) { - const void *map[2]; - map[0] = int2ptr(0); - map[1] = int2ptr(1); - bitcoin_tx_add_output(tx, scriptpubkey_p2wpkh(tx, changekey), - NULL, change); - permute_outputs(tx, NULL, map); - *outnum = (map[0] == int2ptr(0) ? 0 : 1); - } else { - *outnum = 0; - } - - permute_inputs(tx, (const void **)utxomap); - - bitcoin_tx_finalize(tx); - assert(bitcoin_tx_check(tx)); - return tx; -} diff --git a/common/funding_tx.h b/common/funding_tx.h deleted file mode 100644 index 577a4cafb..000000000 --- a/common/funding_tx.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef LIGHTNING_COMMON_FUNDING_TX_H -#define LIGHTNING_COMMON_FUNDING_TX_H -#include "config.h" -#include -#include -#include -#include - -struct bitcoin_tx; -struct ext_key; -struct privkey; -struct pubkey; -struct utxo; - -/** - * funding_tx: create a P2WSH funding transaction for a channel. - * @ctx: context to tal from. - * @chainparams: (in) the params for the resulting transaction. - * @outnum: (out) txout (0 or 1) which is the funding output. - * @utxomap: (in/out) tal_arr of UTXO pointers to spend (permuted to match) - * @funding: (in) satoshis to output. - * @local_fundingkey: (in) local key for 2of2 funding output. - * @remote_fundingkey: (in) remote key for 2of2 funding output. - * @change: (in) amount to send as change. - * @changekey: (in) key to send change to (only used if change_satoshis != 0). - * @bip32_base: (in) bip32 base for key derivation, or NULL. - * - * If bip32_base is supplied, scriptSig will be added for p2sh inputs: this - * means our signing code will fail, but txid will be correct. If NULL, - * the txid will be incorrect, by signing will succeed. - * - * This is done because all other txs have no scriptSig (being pure Segwit) - * so our signature code simply asserts there's no scriptsig (which would - * have to be removed for signing anyway). The funding transaction is - * a special case because of the P2SH inputs. - */ -struct bitcoin_tx *funding_tx(const tal_t *ctx, - const struct chainparams *chainparams, - u16 *outnum, - const struct utxo **utxomap, - struct amount_sat funding, - const struct pubkey *local_fundingkey, - const struct pubkey *remote_fundingkey, - struct amount_sat change, - const struct pubkey *changekey, - const struct ext_key *bip32_base); -#endif /* LIGHTNING_COMMON_FUNDING_TX_H */ diff --git a/common/test/run-funding_tx.c b/common/test/run-funding_tx.c deleted file mode 100644 index f57a7149b..000000000 --- a/common/test/run-funding_tx.c +++ /dev/null @@ -1,229 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../amount.c" -#define SUPERVERBOSE printf -#include "../funding_tx.c" -#undef SUPERVERBOSE -#include "../key_derive.c" -#include "../type_to_string.c" -#include "../permute_tx.c" -#include "../utxo.c" - -/* 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 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_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_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 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_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_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 */ - -#if 0 -static struct sha256 sha256_from_hex(const char *hex) -{ - struct sha256 sha256; - if (strstarts(hex, "0x")) - hex += 2; - if (!hex_decode(hex, strlen(hex), &sha256, sizeof(sha256))) - abort(); - return sha256; -} - -static struct privkey privkey_from_hex(const char *hex) -{ - struct privkey pk; - size_t len; - if (strstarts(hex, "0x")) - hex += 2; - len = strlen(hex); - if (len == 66 && strends(hex, "01")) - len -= 2; - if (!hex_decode(hex, len, &pk, sizeof(pk))) - abort(); - return pk; -} -#endif - -int main(int argc, const char *argv[]) -{ - common_setup(argv[0]); - - struct bitcoin_tx *input, *funding; - struct amount_sat fee, change; - struct pubkey local_funding_pubkey, remote_funding_pubkey; - struct privkey input_privkey; - struct pubkey inputkey; - bool testnet; - struct utxo utxo; - const struct utxo **utxomap; - struct amount_sat funding_sat; - u16 funding_outnum; - u8 *subscript, *script; - struct bitcoin_signature sig; - struct bitcoin_address addr; - struct amount_sat tmpamt; - struct amount_asset asset; - - chainparams = chainparams_for_network("bitcoin"); - - /* BOLT #3: - * - * Block 1 coinbase transaction: 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03510101ffffffff0100f2052a010000001976a9143ca33c2e4446f4a305f23c80df8ad1afdcf652f988ac00000000 - */ - input = bitcoin_tx_from_hex(tmpctx, - "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03510101ffffffff0100f2052a010000001976a9143ca33c2e4446f4a305f23c80df8ad1afdcf652f988ac00000000", - strlen("01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff03510101ffffffff0100f2052a010000001976a9143ca33c2e4446f4a305f23c80df8ad1afdcf652f988ac00000000")); - input->chainparams = chainparams_for_network("bitcoin"); - assert(input); - - /* BOLT #3: - * Block 1 coinbase privkey: 6bd078650fcee8444e4e09825227b801a1ca928debb750eb36e6d56124bb20e801 - * # privkey in base58: cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz - */ - if (!key_from_base58("cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz", strlen("cRCH7YNcarfvaiY1GWUKQrRGmoezvfAiqHtdRvxe16shzbd7LDMz"), - &testnet, &input_privkey, &inputkey)) - abort(); - assert(testnet); - printf("* Block 1 coinbase privkey: %s\n", - type_to_string(tmpctx, struct privkey, &input_privkey)); - - /* BOLT #3: - * - * The funding transaction is paid to the following pubkeys: - * - * local_funding_pubkey: 023da092f6980e58d2c037173180e9a465476026ee50f96695963e8efe436f54eb - * remote_funding_pubkey: 030e9f7b623d2ccc7c9bd44d66d5ce21ce504c0acf6385a132cec6d3c39fa711c1 - */ - if (!pubkey_from_hexstr("023da092f6980e58d2c037173180e9a465476026ee50f96695963e8efe436f54eb", - strlen("023da092f6980e58d2c037173180e9a465476026ee50f96695963e8efe436f54eb"), - &local_funding_pubkey)) - abort(); - if (!pubkey_from_hexstr("030e9f7b623d2ccc7c9bd44d66d5ce21ce504c0acf6385a132cec6d3c39fa711c1", - strlen("030e9f7b623d2ccc7c9bd44d66d5ce21ce504c0acf6385a132cec6d3c39fa711c1"), - &remote_funding_pubkey)) - abort(); - - bitcoin_txid(input, &utxo.txid); - utxo.outnum = 0; - utxo.amount = AMOUNT_SAT(5000000000); - utxo.is_p2sh = false; - utxo.close_info = NULL; - utxo.scriptPubkey = tal_hexdata(tmpctx, "a914a5996075e4b468c9fb01d131bf9d4052a6fee19e87", strlen("a914a5996075e4b468c9fb01d131bf9d4052a6fee19e87")); - funding_sat = AMOUNT_SAT(10000000); - fee = AMOUNT_SAT(13920); - - printf("input[0] txid: %s\n", - tal_hexstr(tmpctx, &utxo.txid, sizeof(utxo.txid))); - printf("input[0] input: %u\n", utxo.outnum); - printf("input[0] satoshis: %s\n", - type_to_string(tmpctx, struct amount_sat, &utxo.amount)); - printf("funding: %s\n", - type_to_string(tmpctx, struct amount_sat, &funding_sat)); - - utxomap = tal_arr(tmpctx, const struct utxo *, 1); - utxomap[0] = &utxo; - if (!amount_sat_sub(&change, utxo.amount, funding_sat) - || !amount_sat_sub(&change, change, fee)) - abort(); - funding = funding_tx(tmpctx, chainparams, - &funding_outnum, utxomap, - funding_sat, - &local_funding_pubkey, - &remote_funding_pubkey, - change, - &inputkey, NULL); - printf("# fee: %s\n", - type_to_string(tmpctx, struct amount_sat, &fee)); - - asset = bitcoin_tx_output_get_amount(funding, !funding_outnum); - assert(amount_asset_is_main(&asset)); - tmpamt = amount_asset_to_sat(&asset); - printf("change: %s\n", - type_to_string(tmpctx, struct amount_sat, - &tmpamt)); - - printf("funding output: %u\n", funding_outnum); - - pubkey_to_hash160(&inputkey, &addr.addr); - subscript = scriptpubkey_p2pkh(funding, &addr); - sign_tx_input(funding, 0, subscript, NULL, &input_privkey, &inputkey, - SIGHASH_ALL, &sig); - - script = bitcoin_redeem_p2pkh(funding, &inputkey, &sig); - bitcoin_tx_input_set_script(funding, 0, script); - printf("funding tx: %s\n", - tal_hex(tmpctx, linearize_tx(tmpctx, funding))); - - /* No memory leaks please */ - common_shutdown(); - return 0; -} diff --git a/common/utxo.c b/common/utxo.c index 5f78cc69e..25fa4dd59 100644 --- a/common/utxo.c +++ b/common/utxo.c @@ -64,63 +64,6 @@ struct utxo *fromwire_utxo(const tal_t *ctx, const u8 **ptr, size_t *max) return utxo; } -struct bitcoin_tx *tx_spending_utxos(const tal_t *ctx, - const struct chainparams *chainparams, - const struct utxo **utxos, - const struct ext_key *bip32_base, - bool add_change_output, - size_t num_output, - u32 nlocktime, - u32 nsequence) -{ - struct pubkey key; - u8 *scriptSig, *redeemscript; - - size_t outcount = add_change_output ? 1 + num_output : num_output; - struct bitcoin_tx *tx = bitcoin_tx(ctx, chainparams, tal_count(utxos), - outcount, nlocktime); - - for (size_t i = 0; i < tal_count(utxos); i++) { - u32 this_nsequence; - if (utxos[i]->is_p2sh && bip32_base) { - bip32_pubkey(bip32_base, &key, utxos[i]->keyindex); - scriptSig = - bitcoin_scriptsig_p2sh_p2wpkh(tmpctx, &key); - redeemscript = - bitcoin_redeem_p2sh_p2wpkh(tmpctx, &key); - - } else { - scriptSig = NULL; - redeemscript = NULL; - } - - /* BOLT-a12da24dd0102c170365124782b46d9710950ac1 #3: - * #### `to_remote` Output - * ... - * The output is spent by a transaction with `nSequence` field - * set to `1` and witness: - */ - if (utxos[i]->close_info && utxos[i]->close_info->option_anchor_outputs) - this_nsequence = 1; - else - this_nsequence = nsequence; - - bitcoin_tx_add_input(tx, &utxos[i]->txid, - utxos[i]->outnum, - this_nsequence, - scriptSig, utxos[i]->amount, - utxos[i]->scriptPubkey, NULL); - - /* Add redeemscript to the PSBT input */ - if (redeemscript) - psbt_input_set_redeemscript(tx->psbt, i, - redeemscript); - - } - - return tx; -} - size_t utxo_spend_weight(const struct utxo *utxo) { return bitcoin_tx_simple_input_weight(utxo->is_p2sh); diff --git a/common/utxo.h b/common/utxo.h index 527ebee03..4dd1c1642 100644 --- a/common/utxo.h +++ b/common/utxo.h @@ -50,16 +50,6 @@ struct utxo { void towire_utxo(u8 **pptr, const struct utxo *utxo); struct utxo *fromwire_utxo(const tal_t *ctx, const u8 **ptr, size_t *max); -/* Create a tx, and populate inputs from utxos */ -struct bitcoin_tx *tx_spending_utxos(const tal_t *ctx, - const struct chainparams *chainparams, - const struct utxo **utxos, - const struct ext_key *bip32_base, - bool add_change_output, - size_t num_output, - u32 nlocktime, - u32 nsequence); - /* Estimate of (signed) UTXO weight in transaction */ size_t utxo_spend_weight(const struct utxo *utxo); #endif /* LIGHTNING_COMMON_UTXO_H */ diff --git a/devtools/Makefile b/devtools/Makefile index d55ee1616..0034f393f 100644 --- a/devtools/Makefile +++ b/devtools/Makefile @@ -67,11 +67,11 @@ $(DEVTOOLS_OBJS) $(DEVTOOLS_TOOL_OBJS): wire/wire.h devtools/mkcommit: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) common/derive_basepoints.o common/keyset.o common/key_derive.o common/initial_commit_tx.o common/permute_tx.o wire/fromwire.o wire/towire.o devtools/mkcommit.o channeld/full_channel.o common/initial_channel.o common/htlc_state.o common/pseudorand.o common/htlc_tx.o channeld/commit_tx.o common/htlc_trim.o -devtools/mkfunding: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/funding_tx.o common/utxo.o common/permute_tx.o common/key_derive.o devtools/mkfunding.o +devtools/mkfunding: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/key_derive.o devtools/mkfunding.o devtools/mkclose: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/mkclose.o -devtools/mkgossip: $(DEVTOOLS_COMMON_OBJS) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o common/funding_tx.o common/utxo.o common/permute_tx.o common/key_derive.o devtools/mkgossip.o +devtools/mkgossip: $(DEVTOOLS_COMMON_OBJS) $(CCAN_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) $(CCAN_OBJS) $(BITCOIN_OBJS) wire/fromwire.o wire/towire.o devtools/mkencoded.o diff --git a/devtools/mkfunding.c b/devtools/mkfunding.c index dcc37a425..507d7874b 100644 --- a/devtools/mkfunding.c +++ b/devtools/mkfunding.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -37,6 +36,44 @@ static char *sig_as_hex(const struct bitcoin_signature *sig) return tal_hexstr(NULL, compact_sig, sizeof(compact_sig)); } +static struct bitcoin_tx *tx_spending_utxo(const tal_t *ctx, + const struct utxo *utxo, + size_t num_output, + u32 nlocktime, + u32 nsequence) +{ + struct bitcoin_tx *tx = bitcoin_tx(ctx, chainparams, 1, num_output, + nlocktime); + + assert(!utxo->is_p2sh); + bitcoin_tx_add_input(tx, &utxo->txid, utxo->outnum, + nsequence, NULL, utxo->amount, + utxo->scriptPubkey, NULL); + + return tx; +} + +static struct bitcoin_tx *funding_tx(const tal_t *ctx, + const struct utxo *utxo, + struct amount_sat funding, + const struct pubkey *local_fundingkey, + const struct pubkey *remote_fundingkey) +{ + u8 *wscript; + struct bitcoin_tx *tx; + + tx = tx_spending_utxo(ctx, utxo, + 1, 0, BITCOIN_TX_DEFAULT_SEQUENCE); + + wscript = bitcoin_redeem_2of2(tx, local_fundingkey, remote_fundingkey); + bitcoin_tx_add_output(tx, scriptpubkey_p2wsh(tx, wscript), wscript, funding); + tal_free(wscript); + + bitcoin_tx_finalize(tx); + assert(bitcoin_tx_check(tx)); + return tx; +} + int main(int argc, char *argv[]) { struct privkey input_privkey; @@ -46,10 +83,8 @@ int main(int argc, char *argv[]) unsigned int feerate_per_kw; int argnum; struct bitcoin_tx *tx; - u16 outnum; size_t weight; struct utxo input; - const struct utxo **utxomap; struct bitcoin_signature sig; struct bitcoin_txid txid; u8 **witnesses; @@ -111,14 +146,9 @@ int main(int argc, char *argv[]) type_to_string(NULL, struct amount_sat, &input.amount), type_to_string(NULL, struct amount_sat, &fee)); - /* funding_tx wants a utxo array. */ - utxomap = tal_arr(tmpctx, const struct utxo *, 1); - utxomap[0] = &input; - /* No change output, so we don't need a bip32 base. */ - tx = funding_tx(NULL, chainparams, &outnum, utxomap, funding_amount, - &funding_localkey, &funding_remotekey, - AMOUNT_SAT(0), NULL, NULL); + tx = funding_tx(NULL, &input, funding_amount, + &funding_localkey, &funding_remotekey); /* P2WSH of inputkey */ bitcoin_tx_input_set_script(tx, 0, NULL); diff --git a/hsmd/Makefile b/hsmd/Makefile index f3ad5ca72..e72ab99d5 100644 --- a/hsmd/Makefile +++ b/hsmd/Makefile @@ -24,7 +24,6 @@ HSMD_COMMON_OBJS := \ common/daemon.o \ common/daemon_conn.o \ common/derive_basepoints.o \ - common/funding_tx.o \ common/status_wiregen.o \ common/hash_u5.o \ common/key_derive.o \ diff --git a/hsmd/hsmd.c b/hsmd/hsmd.c index 1bd52a4df..fe25a542c 100644 --- a/hsmd/hsmd.c +++ b/hsmd/hsmd.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/lightningd/Makefile b/lightningd/Makefile index 2894fbedc..09e41a536 100644 --- a/lightningd/Makefile +++ b/lightningd/Makefile @@ -74,7 +74,6 @@ LIGHTNINGD_COMMON_OBJS := \ common/ecdh_hsmd.o \ common/features.o \ common/fee_states.o \ - common/funding_tx.o \ common/peer_status_wiregen.o \ common/status_wiregen.o \ common/gossip_rcvd_filter.o \ diff --git a/lightningd/opening_control.c b/lightningd/opening_control.c index 023f567e7..628979303 100644 --- a/lightningd/opening_control.c +++ b/lightningd/opening_control.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/openingd/Makefile b/openingd/Makefile index 585408d60..fa076b220 100644 --- a/openingd/Makefile +++ b/openingd/Makefile @@ -34,7 +34,6 @@ OPENINGD_COMMON_OBJS := \ common/dev_disconnect.o \ common/features.o \ common/fee_states.o \ - common/funding_tx.o \ common/status_wiregen.o \ common/peer_status_wiregen.o \ common/gossip_rcvd_filter.o \ diff --git a/openingd/openingd.c b/openingd/openingd.c index 3520e3b93..d365efabe 100644 --- a/openingd/openingd.c +++ b/openingd/openingd.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include