|
NAMElightning-multifundchannel - Command for establishing many lightning channelsSYNOPSISmultifundchannel destinations [feerate] [minconf] [utxos] [minchannels] [commitment_feerate]DESCRIPTIONThe multifundchannel RPC command opens multiple payment channels with nodes by committing a single funding transaction to the blockchain that is shared by all channels.If not already connected, multifundchannel will automatically attempt to connect; you may provide a @host:port hint appended to the node ID so that c-lightning can learn how to connect to the node; see lightning-connect(7). Once the transaction is confirmed, normal channel operations may begin. Readiness is indicated by listpeers reporting a state of CHANNELD_NORMAL for the channel. destinations is an array of objects, with the fields:
There must be at least one entry in destinations; it cannot be an empty array. feerate is an optional feerate used for the opening transaction and, if commitment_feerate is not set, as the initial feerate for commitment and HTLC transactions. It can be one of the strings urgent (aim for next block), normal (next 4 blocks or so) or slow (next 100 blocks or so) to use lightningd's internal estimates: normal is the default. Otherwise, feerate is a number, with an optional suffix: perkw means the number is interpreted as satoshi-per-kilosipa (weight), and perkb means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting the suffix is equivalent to perkb. minconf specifies the minimum number of confirmations that used outputs should have. Default is 1. utxos specifies the utxos to be used to fund the channel, as an array of "txid:vout". minchannels, if specified, will re-attempt funding as long as at least this many peers remain (must not be zero). The multifundchannel command will only fail if too many peers fail the funding process. commitment_feerate is the initial feerate for commitment and HTLC transactions. See feerate for valid values. RETURN VALUEThis command opens multiple channels with a single large transaction, thus only one transaction is returned.If minchannels was specified and is less than the number of destinations, then it is possible that one or more of the destinations do not have a channel even if multifundchannel succeeded. On success, an object is returned, containing:
On failure, none of the channels are created. The following error codes may occur:
Failure may also occur if lightningd and the peer cannot agree on channel parameters (funding limits, channel reserves, fees, etc.). See lightning-fundchannel_start(7) and lightning-fundchannel_complete(7). There may be rare edge cases where a communications failure later in the channel funding process will cancel the funding locally, but the peer thinks the channel is already waiting for funding lockin. In that case, the next time we connect to the peer, our node will tell the peer to forget the channel, but some nodes (in particular, c-lightning nodes) will disconnect when our node tells them to forget the channel. If you immediately multifundchannel with that peer, it could trigger this connect-forget-disconnect behavior, causing the second multifundchannel to fail as well due to disconnection. Doing a connect with the peers separately, and waiting for a few seconds, should help clear this hurdle; running multifundchannel a third time would also clear this. AUTHORZmnSCPxj <ZmnSCPxj@protonmail.com> is mainly responsible.SEE ALSOlightning-connect(7), lightning-listfunds(), lightning-listpeers(7), lightning-fundchannel(7)RESOURCESMain web site: https://github.com/ElementsProject/lightning Visit the GSP FreeBSD Man Page Interface. |