mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
doc: big BOLT update to incorporate warnings language.
We do this (send warnings) in almost all cases anyway, so mainly this is a textual update, but there are some changes: 1. Send ERROR not WARNING if they send a malformed commitment secret. 2. Send WARNING not ERROR if they get the shutdown_scriptpubkey wrong (vs upfront) 3. Send WARNING not ERROR if they send a bad shutdown_scriptpubkey (e.g. p2pkh in future) 4. Rename some vars 'err' to 'warn' to make it clear we send a warning. This means test_option_upfront_shutdown_script can be made reliable, too, and it now warns and doesn't automatically close channel. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -33,10 +33,12 @@ struct short_channel_id *decode_short_ids(const tal_t *ctx, const u8 *encoded)
|
||||
* The receiver:
|
||||
* - if the first byte of `encoded_short_ids` is not a known encoding
|
||||
* type:
|
||||
* - MAY fail the connection
|
||||
* - MAY send a `warning`.
|
||||
* - MAY close the connection.
|
||||
* - if `encoded_short_ids` does not decode into a whole number of
|
||||
* `short_channel_id`:
|
||||
* - MAY fail the connection
|
||||
* - MAY send a `warning`.
|
||||
* - MAY close the connection.
|
||||
*/
|
||||
type = fromwire_u8(&encoded, &max);
|
||||
switch (type) {
|
||||
@@ -75,10 +77,12 @@ bigsize_t *decode_scid_query_flags(const tal_t *ctx,
|
||||
*...
|
||||
* - if the incoming message includes `query_short_channel_ids_tlvs`:
|
||||
* - if `encoding_type` is not a known encoding type:
|
||||
* - MAY fail the connection
|
||||
* - MAY send a `warning`.
|
||||
* - MAY close the connection.
|
||||
* - if `encoded_query_flags` does not decode to exactly one flag per
|
||||
* `short_channel_id`:
|
||||
* - MAY fail the connection.
|
||||
* - MAY send a `warning`.
|
||||
* - MAY close the connection.
|
||||
*/
|
||||
switch (qf->encoding_type) {
|
||||
case ARR_ZLIB:
|
||||
|
||||
Reference in New Issue
Block a user