df-rbf: update rejection criteria for tx_sigs

since we might be in the middle of an RBF, update our checks to be more
robust
This commit is contained in:
niftynei 2021-02-10 15:10:26 -06:00 committed by Rusty Russell
parent dfdf9259d7
commit ad0f92aef1
1 changed files with 20 additions and 0 deletions

View File

@ -850,6 +850,26 @@ static void handle_tx_sigs(struct state *state, const u8 *msg)
return;
}
if (!tx_state->psbt)
open_err_warn(state,
"tx_signatures for %s received,"
" open negotiation still in progress.",
type_to_string(tmpctx,
struct bitcoin_txid,
&txid));
if (!bitcoin_txid_eq(&tx_state->funding_txid, &txid))
open_err_warn(state,
"tx_signatures for %s received,"
"working on funding_txid %s",
type_to_string(tmpctx,
struct bitcoin_txid,
&txid),
type_to_string(tmpctx,
struct bitcoin_txid,
&tx_state->funding_txid));
/* We put the PSBT + sigs all together */
for (size_t i = 0; i < tx_state->psbt->num_inputs; i++) {
struct wally_psbt_input *in =