The only time underscores aren't special in Markdown is when they appear in preformatted text. We have gotten away with not escaping underscores where an asterisk-enclosed span or the paragraph ends before the next underscore appears, but this is fragile and bad practice. Conversely, there are many places where we have not escaped underscores but needed to. Escape all underscores that do not appear in preformatted blocks or preformatted spans and are not themselves delineating emphasized spans. The changes in this commit are exactly the result of executing the following Bash code: ```bash e=':x;' # begin loop e+='s/^' # anchor match at beginning of line e+='(' # begin capturing subexpression e+='(' # begin list of alternatives e+='[^`_\\]|' # any mundane character, or e+='`([^`\\]|\\.)*`|' # backtick-enclosed span, or e+='\b_|_\b|' # underscore at boundary, or e+='\\.' # backslash-escaped character e+=')*' # any number of the preceding alternatives e+=')' # end capturing subexpression e+='\B_\B/\1\\_/;' # escape non-formatting underscore e+='tx' # repeat loop if we escaped an underscore escape_underscores=( sed # use extended regular expressions -E # skip over indented blocks (following an empty line) -e '/^$/{:i;n;/^( {4,}|\t)/bi}' # skip over preformatted blocks -e '/^\s*```/,/^\s*```/{p;d}' # skip over generated sections -e '/GENERATE-FROM-SCHEMA-START/,/GENERATE-FROM-SCHEMA-END/{p;d}' # escape underscores -e "${e}" ) "${escape_underscores[@]}" -i doc/*.[0-9].md ``` Changelog-None
2.1 KiB
lightning-openchannel_signed -- Command to conclude a channel open
SYNOPSIS
openchannel_signed channel_id signed_psbt
DESCRIPTION
openchannel_signed
is a low level RPC command which concludes a channel
open with the specified peer. It uses the v2 openchannel protocol, which
allows for interactive transaction construction.
This command should be called after openchannel_update
returns
commitments_secured true
.
This command will broadcast the finalized funding transaction, if we receive valid signatures from the peer.
channel_id is the id of the channel.
signed_psbt is the PSBT returned from openchannel_update
(where
commitments_secured was true) with partial signatures or finalized
witness stacks included for every input that we contributed to the
PSBT.
RETURN VALUE
On success, an object is returned, containing:
- channel_id (hex): the channel id of the channel (always 64 characters)
- tx (hex): the funding transaction
- txid (txid): The txid of the tx
On error, the returned object will contain code
and message
properties,
with code
being one of the following:
- -32602: If the given parameters are wrong.
- -1: Catchall nonspecific error.
- 303: Funding transaction broadcast failed.
- 305: Peer is not connected.
- 309: PSBT missing required fields.
- 311: Unknown channel id.
- 312: Channel in an invalid state
SEE ALSO
lightning-openchannel_init(7), lightning-openchannel_update(7), lightning-openchannel_abort(7), lightning-openchannel_bump(7), lightning-fundchannel_start(7), lightning-fundchannel_complete(7), lightning-fundchannel(7), lightning-fundpsbt(7), lightning-utxopsbt(7), lightning-multifundchannel(7)
AUTHOR
@niftynei <niftynei@gmail.com> is mainly responsible.
RESOURCES
Main web site: https://github.com/ElementsProject/lightning comment: # ( SHA256STAMP:41e2a4aed1aaac01675f99e91326197afa370a05e32b2ef20cbbb8247de57289)