Skip to content

Commit

Permalink
openingd: tell them channel_type if signature is bad.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Sep 6, 2021
1 parent 2b4da08 commit 3379cb2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions openingd/openingd.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,14 @@ static bool funder_finalize_channel_setup(struct state *state,

if (!check_tx_sig(*tx, 0, NULL, wscript, &state->their_funding_pubkey, sig)) {
peer_failed_err(state->pps, &state->channel_id,
"Bad signature %s on tx %s using key %s",
"Bad signature %s on tx %s using key %s (channel_type=%s)",
type_to_string(tmpctx, struct bitcoin_signature,
sig),
type_to_string(tmpctx, struct bitcoin_tx, *tx),
type_to_string(tmpctx, struct pubkey,
&state->their_funding_pubkey));
&state->their_funding_pubkey),
fmt_featurebits(tmpctx,
state->channel->type->features));
}

/* We save their sig to our first commitment tx */
Expand Down

0 comments on commit 3379cb2

Please sign in to comment.