Skip to content

Commit ad1e9f7

Browse files
committed
onchaind: don't get final_key_idx.
onchaind used to make its own txs, but doesn't any more. This parameter is useless. Signed-off-by: Rusty Russell <[email protected]>
1 parent 72345c5 commit ad1e9f7

File tree

4 files changed

+1
-7
lines changed

4 files changed

+1
-7
lines changed

lightningd/onchain_control.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,6 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
17981798
&our_last_txid,
17991799
channel->shutdown_scriptpubkey[LOCAL],
18001800
channel->shutdown_scriptpubkey[REMOTE],
1801-
channel->final_key_idx,
18021801
channel->opener,
18031802
&channel->local_basepoints,
18041803
&channel->channel_info.theirbase,

onchaind/onchaind.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ static struct amount_sat dust_limit;
4646
/* The CSV delays for each side. */
4747
static u32 to_self_delay[NUM_SIDES];
4848

49-
/* Where we send money to (our wallet) */
50-
static u32 our_wallet_index;
51-
5249
/* Their revocation secret (only if they cheated). */
5350
static const struct secret *remote_per_commitment_secret;
5451

@@ -3433,7 +3430,6 @@ int main(int argc, char *argv[])
34333430
&our_broadcast_txid,
34343431
&scriptpubkey[LOCAL],
34353432
&scriptpubkey[REMOTE],
3436-
&our_wallet_index,
34373433
&opener,
34383434
&basepoints[LOCAL],
34393435
&basepoints[REMOTE],

onchaind/onchaind_wire.csv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ msgdata,onchaind_init,local_scriptpubkey_len,u16,
2727
msgdata,onchaind_init,local_scriptpubkey,u8,local_scriptpubkey_len
2828
msgdata,onchaind_init,remote_scriptpubkey_len,u16,
2929
msgdata,onchaind_init,remote_scriptpubkey,u8,remote_scriptpubkey_len
30-
msgdata,onchaind_init,ourwallet_index,u32,
3130
# We need these two for commit number obscurer
3231
msgdata,onchaind_init,opener,enum side,
3332
msgdata,onchaind_init,local_basepoints,basepoints,

onchaind/test/run-grind_feerate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool fromwire_onchaind_dev_memleak(const void *p UNNEEDED)
5656
bool fromwire_onchaind_htlcs(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct htlc_stub **htlc UNNEEDED, bool **tell_if_missing UNNEEDED, bool **tell_immediately UNNEEDED)
5757
{ fprintf(stderr, "fromwire_onchaind_htlcs called!\n"); abort(); }
5858
/* Generated stub for fromwire_onchaind_init */
59-
bool fromwire_onchaind_init(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct shachain *shachain UNNEEDED, const struct chainparams **chainparams UNNEEDED, struct amount_sat *funding_amount_satoshi UNNEEDED, struct amount_msat *our_msat UNNEEDED, struct pubkey *old_remote_per_commitment_point UNNEEDED, struct pubkey *remote_per_commitment_point UNNEEDED, u32 *local_to_self_delay UNNEEDED, u32 *remote_to_self_delay UNNEEDED, struct amount_sat *local_dust_limit_satoshi UNNEEDED, struct bitcoin_txid *our_broadcast_txid UNNEEDED, u8 **local_scriptpubkey UNNEEDED, u8 **remote_scriptpubkey UNNEEDED, u32 *ourwallet_index UNNEEDED, enum side *opener UNNEEDED, struct basepoints *local_basepoints UNNEEDED, struct basepoints *remote_basepoints UNNEEDED, struct tx_parts **tx_parts UNNEEDED, u32 *locktime UNNEEDED, u32 *tx_blockheight UNNEEDED, u32 *reasonable_depth UNNEEDED, struct bitcoin_signature **htlc_signature UNNEEDED, u32 *min_possible_feerate UNNEEDED, u32 *max_possible_feerate UNNEEDED, struct pubkey *local_funding_pubkey UNNEEDED, struct pubkey *remote_funding_pubkey UNNEEDED, u64 *local_static_remotekey_start UNNEEDED, u64 *remote_static_remotekey_start UNNEEDED, bool *option_anchor_outputs UNNEEDED, bool *option_anchors_zero_fee_htlc_tx UNNEEDED, u32 *min_relay_feerate UNNEEDED)
59+
bool fromwire_onchaind_init(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct shachain *shachain UNNEEDED, const struct chainparams **chainparams UNNEEDED, struct amount_sat *funding_amount_satoshi UNNEEDED, struct amount_msat *our_msat UNNEEDED, struct pubkey *old_remote_per_commitment_point UNNEEDED, struct pubkey *remote_per_commitment_point UNNEEDED, u32 *local_to_self_delay UNNEEDED, u32 *remote_to_self_delay UNNEEDED, struct amount_sat *local_dust_limit_satoshi UNNEEDED, struct bitcoin_txid *our_broadcast_txid UNNEEDED, u8 **local_scriptpubkey UNNEEDED, u8 **remote_scriptpubkey UNNEEDED, enum side *opener UNNEEDED, struct basepoints *local_basepoints UNNEEDED, struct basepoints *remote_basepoints UNNEEDED, struct tx_parts **tx_parts UNNEEDED, u32 *locktime UNNEEDED, u32 *tx_blockheight UNNEEDED, u32 *reasonable_depth UNNEEDED, struct bitcoin_signature **htlc_signature UNNEEDED, u32 *min_possible_feerate UNNEEDED, u32 *max_possible_feerate UNNEEDED, struct pubkey *local_funding_pubkey UNNEEDED, struct pubkey *remote_funding_pubkey UNNEEDED, u64 *local_static_remotekey_start UNNEEDED, u64 *remote_static_remotekey_start UNNEEDED, bool *option_anchor_outputs UNNEEDED, bool *option_anchors_zero_fee_htlc_tx UNNEEDED, u32 *min_relay_feerate UNNEEDED)
6060
{ fprintf(stderr, "fromwire_onchaind_init called!\n"); abort(); }
6161
/* Generated stub for fromwire_onchaind_known_preimage */
6262
bool fromwire_onchaind_known_preimage(const void *p UNNEEDED, struct preimage *preimage UNNEEDED)

0 commit comments

Comments
 (0)