From 90662b1323e2951c4c1f80d15f1d91ff2ffa0fd0 Mon Sep 17 00:00:00 2001 From: t-bast Date: Mon, 27 Jan 2025 10:01:53 +0100 Subject: [PATCH] Clarify a few requirements As suggested by @yyforyongyu. --- 02-peer-protocol.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/02-peer-protocol.md b/02-peer-protocol.md index 87994c1..830a126 100644 --- a/02-peer-protocol.md +++ b/02-peer-protocol.md @@ -1868,7 +1868,7 @@ The sender of `closing_complete` (aka. "the closer"): - If it does, the output value MUST be set to zero so that all funds go to fees, as specified in [BOLT #3](03-transactions.md#closing-transaction). - If the closee's output amount is dust: - MUST set `closer_output_only`. - - SHOULD NOT set `closer_and_closee_outputs`. + - MUST NOT set `closer_and_closee_outputs`. - Otherwise: - MUST set both `closer_output_only` and `closer_and_closee_outputs`. - MUST generate its closing transaction as specified in [BOLT #3](03-transactions.md#closing-transaction). @@ -1887,6 +1887,10 @@ The receiver of `closing_complete` (aka. "the closee"): - SHOULD ignore `closing_complete`. - SHOULD send a `warning`. - SHOULD close the connection. + - If `closer_scriptpubkey` is invalid (as detailed in the [`shutdown` requirements](#closing-initiation-shutdown)): + - SHOULD ignore `closing_complete`. + - SHOULD send a `warning`. + - SHOULD close the connection. - If `closer_scriptpubkey` is a valid `OP_RETURN` script: - MUST set its output amount to zero so that all funds go to fees, as specified in [BOLT #3](03-transactions.md#closing-transaction). - MUST generate the remote closing transaction as specified in [BOLT #3](03-transactions.md#closing-transaction).