From ad0f92aef1c462f76af81e8ab117fb8cc5ad689f Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 10 Feb 2021 15:10:26 -0600 Subject: [PATCH] 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 --- openingd/dualopend.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 29faf620b..0860b2b2d 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -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 =