mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
msggen: Add conversion from cln-rpc to cln-grpc for Option<Outpoint>
We didn't have optional Outpoints as arguments so far, so let's backfill that. Changelog-Changed: cln-rpc: The `wrong_funding` argument for `close` was changed from `bytes` to `outpoint`
This commit is contained in:
2
cln-grpc/src/convert.rs
generated
2
cln-grpc/src/convert.rs
generated
@@ -1080,7 +1080,7 @@ impl From<&pb::CloseRequest> for requests::CloseRequest {
|
|||||||
unilateraltimeout: c.unilateraltimeout.clone(), // Rule #1 for type u32?
|
unilateraltimeout: c.unilateraltimeout.clone(), // Rule #1 for type u32?
|
||||||
destination: c.destination.clone(), // Rule #1 for type string?
|
destination: c.destination.clone(), // Rule #1 for type string?
|
||||||
fee_negotiation_step: c.fee_negotiation_step.clone(), // Rule #1 for type string?
|
fee_negotiation_step: c.fee_negotiation_step.clone(), // Rule #1 for type string?
|
||||||
wrong_funding: c.wrong_funding.clone(), // Rule #1 for type outpoint?
|
wrong_funding: c.wrong_funding.as_ref().map(|a| a.into()), // Rule #1 for type outpoint?
|
||||||
force_lease_closed: c.force_lease_closed.clone(), // Rule #1 for type boolean?
|
force_lease_closed: c.force_lease_closed.clone(), // Rule #1 for type boolean?
|
||||||
feerange: Some(c.feerange.iter().map(|s| s.into()).collect()), // Rule #4
|
feerange: Some(c.feerange.iter().map(|s| s.into()).collect()), // Rule #4
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -428,6 +428,7 @@ class GrpcUnconverterGenerator(GrpcConverterGenerator):
|
|||||||
'msat_or_any?': f'c.{name}.as_ref().map(|a| a.into())',
|
'msat_or_any?': f'c.{name}.as_ref().map(|a| a.into())',
|
||||||
'feerate': f'c.{name}.as_ref().unwrap().into()',
|
'feerate': f'c.{name}.as_ref().unwrap().into()',
|
||||||
'feerate?': f'c.{name}.as_ref().map(|a| a.into())',
|
'feerate?': f'c.{name}.as_ref().map(|a| a.into())',
|
||||||
|
'outpoint?': f'c.{name}.as_ref().map(|a| a.into())',
|
||||||
'RoutehintList?': f'c.{name}.clone().map(|rl| rl.into())',
|
'RoutehintList?': f'c.{name}.clone().map(|rl| rl.into())',
|
||||||
'short_channel_id': f'cln_rpc::primitives::ShortChannelId::from_str(&c.{name}).unwrap()',
|
'short_channel_id': f'cln_rpc::primitives::ShortChannelId::from_str(&c.{name}).unwrap()',
|
||||||
'short_channel_id?': f'c.{name}.as_ref().map(|v| cln_rpc::primitives::ShortChannelId::from_str(&v).unwrap())',
|
'short_channel_id?': f'c.{name}.as_ref().map(|v| cln_rpc::primitives::ShortChannelId::from_str(&v).unwrap())',
|
||||||
|
|||||||
496
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
496
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user