From 2b919c935e0602a2d6fdda34044c7651ced68f5c Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Mon, 11 Apr 2022 17:09:17 +0200 Subject: [PATCH] bolt2: allow multiple shutdown message from the sender side. Signed-off-by: Vincenzo Palazzo --- 02-peer-protocol.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/02-peer-protocol.md b/02-peer-protocol.md index c0bf2a0ad..aaa81ed27 100644 --- a/02-peer-protocol.md +++ b/02-peer-protocol.md @@ -544,6 +544,7 @@ A sending node: - MAY send a `shutdown` before a `funding_locked`, i.e. before the funding transaction has reached `minimum_depth`. - if there are updates pending on the receiving node's commitment transaction: - MUST NOT send a `shutdown`. + - MAY send multiple `shutdown` message, (but what happens if in the two shutdown message we insert different script? We need to accept only the last one sent?). - MUST NOT send an `update_add_htlc` after a `shutdown`. - if no HTLCs remain in either commitment transaction: - MUST NOT send any `update` message after a `shutdown`. @@ -570,6 +571,7 @@ A receiving node: - if both nodes advertised the `option_upfront_shutdown_script` feature, and the receiving node received a non-zero-length `shutdown_scriptpubkey` in `open_channel` or `accept_channel`, and that `shutdown_scriptpubkey` is not equal to `scriptpubkey`: - MAY send a `warning`. - MUST fail the connection. + - MUST allow multiple `shutdown` messages from the sender. #### Rationale