mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-12 02:08:15 +01:00
splice: Add funding outnum
Fixes #7005 Changelog-Changed: Added outnum of new funding output to splice_signed RPC command
This commit is contained in:
parent
d77301c338
commit
21bc89f189
9 changed files with 337 additions and 312 deletions
|
@ -3113,6 +3113,7 @@
|
|||
"Splice_Signed.sign_first": 3
|
||||
},
|
||||
"Splice_signedResponse": {
|
||||
"Splice_Signed.outnum": 3,
|
||||
"Splice_Signed.tx": 1,
|
||||
"Splice_Signed.txid": 2
|
||||
},
|
||||
|
@ -10788,6 +10789,10 @@
|
|||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.outnum": {
|
||||
"added": "v24.08",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.psbt": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
|
|
1
cln-grpc/proto/node.proto
generated
1
cln-grpc/proto/node.proto
generated
|
@ -2655,6 +2655,7 @@ message Splice_signedRequest {
|
|||
message Splice_signedResponse {
|
||||
bytes tx = 1;
|
||||
bytes txid = 2;
|
||||
optional uint32 outnum = 3;
|
||||
}
|
||||
|
||||
message Splice_updateRequest {
|
||||
|
|
1
cln-grpc/src/convert.rs
generated
1
cln-grpc/src/convert.rs
generated
|
@ -2474,6 +2474,7 @@ impl From<responses::Splice_initResponse> for pb::SpliceInitResponse {
|
|||
impl From<responses::Splice_signedResponse> for pb::SpliceSignedResponse {
|
||||
fn from(c: responses::Splice_signedResponse) -> Self {
|
||||
Self {
|
||||
outnum: c.outnum, // Rule #2 for type u32?
|
||||
tx: hex::decode(&c.tx).unwrap(), // Rule #2 for type hex
|
||||
txid: hex::decode(&c.txid).unwrap(), // Rule #2 for type txid
|
||||
}
|
||||
|
|
2
cln-rpc/src/model.rs
generated
2
cln-rpc/src/model.rs
generated
|
@ -8499,6 +8499,8 @@ pub mod responses {
|
|||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct Splice_signedResponse {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub outnum: Option<u32>,
|
||||
pub tx: String,
|
||||
pub txid: String,
|
||||
}
|
||||
|
|
|
@ -28150,6 +28150,13 @@
|
|||
"description": [
|
||||
"The txid is of the final transaction."
|
||||
]
|
||||
},
|
||||
"outnum": {
|
||||
"added": "v24.08",
|
||||
"type": "u32",
|
||||
"description": [
|
||||
"The index of the new funding output."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1947,6 +1947,7 @@ def splice_init2py(m):
|
|||
|
||||
def splice_signed2py(m):
|
||||
return remove_default({
|
||||
"outnum": m.outnum, # PrimitiveField in generate_composite
|
||||
"tx": hexlify(m.tx), # PrimitiveField in generate_composite
|
||||
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
|
||||
})
|
||||
|
|
|
@ -54,6 +54,13 @@
|
|||
"description": [
|
||||
"The txid is of the final transaction."
|
||||
]
|
||||
},
|
||||
"outnum": {
|
||||
"added": "v24.08",
|
||||
"type": "u32",
|
||||
"description": [
|
||||
"The index of the new funding output."
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -501,6 +501,7 @@ static void handle_tx_broadcast(struct send_splice_info *info)
|
|||
|
||||
json_add_hex(response, "tx", tx_bytes, tal_bytelen(tx_bytes));
|
||||
json_add_txid(response, "txid", &txid);
|
||||
json_add_u32(response, "outnum", info->output_index);
|
||||
|
||||
was_pending(command_success(info->cc->cmd, response));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue