diff --git a/doc/lightning-listpeers.7 b/doc/lightning-listpeers.7 index 03d142e8c..30f19be48 100644 --- a/doc/lightning-listpeers.7 +++ b/doc/lightning-listpeers.7 @@ -86,6 +86,14 @@ BOLT #9 features which apply to this channel (one of "option_static_remotekey", .IP \[bu] \fBfunding_txid\fR (txid, optional): ID of the funding transaction .IP \[bu] +\fBinitial_feerate\fR (string, optional): For inflight opens, the first feerate used to initiate the channel open +.IP \[bu] +\fBlast_feerate\fR (string, optional): For inflight opens, the most recent feerate used on the channel open +.IP \[bu] +\fBnext_feerate\fR (string, optional): For inflight opens, the next feerate we'll use for the channel open +.IP \[bu] +\fBnext_fee_step\fR (u32, optional): For inflight opens, the next feerate step we'll use for the channel open +.IP \[bu] \fBinflight\fR (array of objects, optional): Current candidate funding transactions (only for dual-funding): .RS .IP \[bu] @@ -266,7 +274,7 @@ If \fBinflight\fR is present: .IP \[bu] \fBnext_feerate\fR (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended .IP \[bu] -\fBnext_feestep\fR (u32, optional): The number of fee steps so far, plus one +\fBnext_fee_step\fR (u32): The number of fee steps so far, plus one .RE @@ -638,4 +646,4 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR Lightning RFC site (BOLT #9): \fIhttps://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md\fR -\" SHA256STAMP:840f7597143789d88d7e3ef1c3e8a1e50dbee44b4b471f0608433fd60077248e +\" SHA256STAMP:0eee52605e08ff184fa052d51ada7eb5da26149c6bc3d2a553c8e6518a27818b diff --git a/doc/lightning-listpeers.7.md b/doc/lightning-listpeers.7.md index 281141a00..d10c1373b 100644 --- a/doc/lightning-listpeers.7.md +++ b/doc/lightning-listpeers.7.md @@ -55,6 +55,10 @@ On success, an object containing **peers** is returned. It is an array of objec - **short_channel_id** (short_channel_id, optional): The short_channel_id (once locked in) - **channel_id** (hex, optional): The full channel_id (always 64 characters) - **funding_txid** (txid, optional): ID of the funding transaction + - **initial_feerate** (string, optional): For inflight opens, the first feerate used to initiate the channel open + - **last_feerate** (string, optional): For inflight opens, the most recent feerate used on the channel open + - **next_feerate** (string, optional): For inflight opens, the next feerate we'll use for the channel open + - **next_fee_step** (u32, optional): For inflight opens, the next feerate step we'll use for the channel open - **inflight** (array of objects, optional): Current candidate funding transactions (only for dual-funding): - **funding_txid** (txid): ID of the funding transaction - **funding_outnum** (u32): The 0-based output number of the funding transaction which opens the channel @@ -128,7 +132,7 @@ On success, an object containing **peers** is returned. It is an array of objec - **initial_feerate** (string): The feerate for the initial funding transaction in per-1000-weight, with "kpw" appended - **last_feerate** (string): The feerate for the latest funding transaction in per-1000-weight, with "kpw" appended - **next_feerate** (string): The minimum feerate for the next funding transaction in per-1000-weight, with "kpw" appended - - **next_feestep** (u32, optional): The number of fee steps so far, plus one + - **next_fee_step** (u32): The number of fee steps so far, plus one - **log** (array of objects, optional): if *level* is specified, logs for this peer: - **type** (string) (one of "SKIPPED", "BROKEN", "UNUSUAL", "INFO", "DEBUG", "IO_IN", "IO_OUT") @@ -372,4 +376,4 @@ Main web site: Lightning RFC site (BOLT \#9): -[comment]: # ( SHA256STAMP:61071f726dbf0ac566607035239841ec19695688d4a1fd9f94f3c22ade6548d0) +[comment]: # ( SHA256STAMP:6db6eb853f6c1953f05160cd9026ad6a8ccb97a016b15bc76242adc8026fa4ca) diff --git a/doc/lightning-openchannel_abort.7 b/doc/lightning-openchannel_abort.7 index 32be871a1..55071f358 100644 --- a/doc/lightning-openchannel_abort.7 +++ b/doc/lightning-openchannel_abort.7 @@ -22,9 +22,9 @@ On success, an object is returned, containing: .IP \[bu] \fBchannel_id\fR (hex): the channel id of the aborted channel (always 64 characters) .IP \[bu] -\fBreason\fR (string): usually "Abort requested", but if it happened to fail at the same time it could be different +\fBchannel_canceled\fR (boolean): whether this is completely canceled (there may be remaining in-flight transactions) .IP \[bu] -\fBchannel_canceled\fR (boolean, optional): whether this is completely canceled (there may be remaining in-flight transactions) +\fBreason\fR (string): usually "Abort requested", but if it happened to fail at the same time it could be different .RE @@ -60,4 +60,4 @@ lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7), Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:d2ed75d41e90988cf4a1919afb443e7a8f4b9c52fb8aa404af16d6feb44cacc8 +\" SHA256STAMP:b86aa0f7a245daebb1ed3d2989276213c520c58e790129285ebf5883aabaa876 diff --git a/doc/lightning-openchannel_abort.7.md b/doc/lightning-openchannel_abort.7.md index ab7b602e5..fe6999ee9 100644 --- a/doc/lightning-openchannel_abort.7.md +++ b/doc/lightning-openchannel_abort.7.md @@ -22,8 +22,8 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: - **channel_id** (hex): the channel id of the aborted channel (always 64 characters) +- **channel_canceled** (boolean): whether this is completely canceled (there may be remaining in-flight transactions) - **reason** (string): usually "Abort requested", but if it happened to fail at the same time it could be different -- **channel_canceled** (boolean, optional): whether this is completely canceled (there may be remaining in-flight transactions) [comment]: # (GENERATE-FROM-SCHEMA-END) On error the returned object will contain `code` and `message` properties, @@ -53,4 +53,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:01188472cb94be6d8a69372b8fc6c77e0176aac6234a0ae2332906d2176f820d) +[comment]: # ( SHA256STAMP:491dc25c659eb957138fc0578c8158835f3892345bc4613885d61f761e03a624) diff --git a/doc/lightning-openchannel_init.7 b/doc/lightning-openchannel_init.7 index 0e236b7a9..be59860eb 100644 --- a/doc/lightning-openchannel_init.7 +++ b/doc/lightning-openchannel_init.7 @@ -51,11 +51,11 @@ On success, an object is returned, containing: .IP \[bu] \fBchannel_id\fR (hex): the channel id of the channel (always 64 characters) .IP \[bu] +\fBpsbt\fR (string): the (incomplete) PSBT of the funding transaction +.IP \[bu] \fBcommitments_secured\fR (boolean): whether the \fIpsbt\fR is complete (always \fIfalse\fR) .IP \[bu] \fBfunding_serial\fR (u64): the serial_id of the funding output in the \fIpsbt\fR -.IP \[bu] -\fBintiialpsbt\fR (string, optional): the (incomplete) PSBT of the funding transaction .RE @@ -105,4 +105,4 @@ lightning-fundchannel_\fBcomplete\fR(7), \fBlightning-fundchannel\fR(7), Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:4663cea3fc74a8e91e7a3de6997a7b5a236bacf84dda3ed826cbbd7d544c39e8 +\" SHA256STAMP:ba03cf64c3578303a0cdfcf94546bb94d86ecf3d6187b16871a39c08b3a40f38 diff --git a/doc/lightning-openchannel_init.7.md b/doc/lightning-openchannel_init.7.md index 7bb95f95c..36c187c49 100644 --- a/doc/lightning-openchannel_init.7.md +++ b/doc/lightning-openchannel_init.7.md @@ -45,9 +45,9 @@ RETURN VALUE [comment]: # (GENERATE-FROM-SCHEMA-START) On success, an object is returned, containing: - **channel_id** (hex): the channel id of the channel (always 64 characters) +- **psbt** (string): the (incomplete) PSBT of the funding transaction - **commitments_secured** (boolean): whether the *psbt* is complete (always *false*) - **funding_serial** (u64): the serial_id of the funding output in the *psbt* -- **intiialpsbt** (string, optional): the (incomplete) PSBT of the funding transaction [comment]: # (GENERATE-FROM-SCHEMA-END) If the peer does not support `option_dual_fund`, this command @@ -85,4 +85,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:a633941043ea5882c89e444cd1e41cb7040716c092b4b5e8aaf6ddafbbcf1a5d) +[comment]: # ( SHA256STAMP:6e5ce1c2b8aeb96b7e5469b6546a3bbf192f7d937cce8ec774ab716edf9ff9dc) diff --git a/doc/lightning-openchannel_update.7 b/doc/lightning-openchannel_update.7 index 18c2aec4d..3f114ea59 100644 --- a/doc/lightning-openchannel_update.7 +++ b/doc/lightning-openchannel_update.7 @@ -38,6 +38,8 @@ On success, an object is returned, containing: \fBpsbt\fR (string): the PSBT of the funding transaction .IP \[bu] \fBcommitments_secured\fR (boolean): whether the \fIpsbt\fR is complete (if true, sign \fIpsbt\fR and call \fBopenchannel_signed\fR to complete the channel open) +.IP \[bu] +\fBfunding_outnum\fR (u32, optional): The index of the funding output in the psbt .RE @@ -85,4 +87,4 @@ lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7), Main web site: \fIhttps://github.com/ElementsProject/lightning\fR -\" SHA256STAMP:e363c79e7b56230752d8e1612ae1587501d1376c7b2b18dd647baaf25303372b +\" SHA256STAMP:9d0366ebbbef8d86e87174133a18113393c7ad4657f3d90456ff28664109894b diff --git a/doc/lightning-openchannel_update.7.md b/doc/lightning-openchannel_update.7.md index ed09a5f1e..e92e28483 100644 --- a/doc/lightning-openchannel_update.7.md +++ b/doc/lightning-openchannel_update.7.md @@ -33,6 +33,7 @@ On success, an object is returned, containing: - **channel_id** (hex): the channel id of the channel (always 64 characters) - **psbt** (string): the PSBT of the funding transaction - **commitments_secured** (boolean): whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open) +- **funding_outnum** (u32, optional): The index of the funding output in the psbt [comment]: # (GENERATE-FROM-SCHEMA-END) If *commitments_secured* is true, will also return: @@ -68,4 +69,4 @@ RESOURCES --------- Main web site: -[comment]: # ( SHA256STAMP:7e6db299a5b5bbbd3561c69153ea6444d51850a814a8bec58e433fa7be97949c) +[comment]: # ( SHA256STAMP:24ebba507f0bc155be12a34c5bebc8002964985afed0f2b3100e809f545a4ae7) diff --git a/doc/schemas/listpeers.schema.json b/doc/schemas/listpeers.schema.json index e992bf98d..c8f2ba81a 100644 --- a/doc/schemas/listpeers.schema.json +++ b/doc/schemas/listpeers.schema.json @@ -177,6 +177,22 @@ "type": "txid", "description": "ID of the funding transaction" }, + "initial_feerate": { + "type": "string", + "description": "For inflight opens, the first feerate used to initiate the channel open" + }, + "last_feerate": { + "type": "string", + "description": "For inflight opens, the most recent feerate used on the channel open" + }, + "next_feerate": { + "type": "string", + "description": "For inflight opens, the next feerate we'll use for the channel open" + }, + "next_fee_step": { + "type": "u32", + "description": "For inflight opens, the next feerate step we'll use for the channel open" + }, "inflight": { "type": "array", "description": "Current candidate funding transactions (only for dual-funding)", @@ -616,6 +632,10 @@ "out_fulfilled_msat": { }, "out_msatoshi_fulfilled": { }, "htlcs": { }, + "initial_feerate": { }, + "last_feerate": { }, + "next_feerate": { }, + "next_fee_step": { }, "inflight": { }, "last_tx_fee": { }, "last_tx_fee_msat": { }, @@ -700,7 +720,7 @@ "initial_feerate": { }, "last_feerate": { }, "next_feerate": { }, - "next_feestep": { }, + "next_fee_step": { }, "direction": { }, "last_tx_fee": { "deprecated": true @@ -786,7 +806,7 @@ "initial_feerate": { }, "last_feerate": { }, "next_feerate": { }, - "next_feestep": { }, + "next_fee_step": { }, "last_tx_fee": { }, "last_tx_fee_msat": { }, "direction": { @@ -882,7 +902,7 @@ "type": "string", "description": "The minimum feerate for the next funding transaction in per-1000-weight, with \"kpw\" appended" }, - "next_feestep": { + "next_fee_step": { "type": "u32", "description": "The number of fee steps so far, plus one" } diff --git a/doc/schemas/openchannel_abort.schema.json b/doc/schemas/openchannel_abort.schema.json index 0d32cf526..a24f32847 100644 --- a/doc/schemas/openchannel_abort.schema.json +++ b/doc/schemas/openchannel_abort.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, - "required": [ "channel_id", "cannel_canceled", "reason" ], + "required": [ "channel_id", "channel_canceled", "reason" ], "properties": { "channel_id": { "type": "hex", diff --git a/doc/schemas/openchannel_init.schema.json b/doc/schemas/openchannel_init.schema.json index e345e6445..17698593e 100644 --- a/doc/schemas/openchannel_init.schema.json +++ b/doc/schemas/openchannel_init.schema.json @@ -10,7 +10,7 @@ "maxLength": 64, "minLength": 64 }, - "intiialpsbt": { + "psbt": { "type": "string", "description": "the (incomplete) PSBT of the funding transaction" }, diff --git a/doc/schemas/openchannel_update.schema.json b/doc/schemas/openchannel_update.schema.json index c820fc023..14d4f3101 100644 --- a/doc/schemas/openchannel_update.schema.json +++ b/doc/schemas/openchannel_update.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, - "required": [ "channel_id", "psbt", "commitments_secured" ], + "required": [ "channel_id", "psbt", "commitments_secured"], "properties": { "channel_id": { "type": "hex", @@ -17,6 +17,10 @@ "commitments_secured": { "type": "boolean", "description": "whether the *psbt* is complete (if true, sign *psbt* and call `openchannel_signed` to complete the channel open)" + }, + "funding_outnum": { + "type": "u32", + "description": "The index of the funding output in the psbt" } } } diff --git a/tests/test_opening.py b/tests/test_opening.py index 7758e7da1..5f826aca9 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -1,6 +1,6 @@ from fixtures import * # noqa: F401,F403 from fixtures import TEST_NETWORK -from pyln.client import RpcError +from pyln.client import RpcError, Millisatoshi from utils import ( only_one, wait_for, sync_blockheight, first_channel_id )