mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
Setchannel request is provided
This commit is contained in:
committed by
Christian Decker
parent
6324980484
commit
51e2433087
@@ -849,6 +849,26 @@ def ping2py(m):
|
||||
})
|
||||
|
||||
|
||||
def setchannel_channels2py(m):
|
||||
return remove_default({
|
||||
"peer_id": hexlify(m.peer_id), # PrimitiveField in generate_composite
|
||||
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
|
||||
"short_channel_id": m.short_channel_id, # PrimitiveField in generate_composite
|
||||
"fee_base_msat": amount2msat(m.fee_base_msat), # PrimitiveField in generate_composite
|
||||
"fee_proportional_millionths": m.fee_proportional_millionths, # PrimitiveField in generate_composite
|
||||
"minimum_htlc_out_msat": amount2msat(m.minimum_htlc_out_msat), # PrimitiveField in generate_composite
|
||||
"warning_htlcmin_too_low": m.warning_htlcmin_too_low, # PrimitiveField in generate_composite
|
||||
"maximum_htlc_out_msat": amount2msat(m.maximum_htlc_out_msat), # PrimitiveField in generate_composite
|
||||
"warning_htlcmax_too_high": m.warning_htlcmax_too_high, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def setchannel2py(m):
|
||||
return remove_default({
|
||||
"channels": [setchannel_channels2py(i) for i in m.channels], # ArrayField[composite] in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def signmessage2py(m):
|
||||
return remove_default({
|
||||
"signature": hexlify(m.signature), # PrimitiveField in generate_composite
|
||||
|
||||
52
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
52
contrib/pyln-testing/pyln/testing/node_pb2.py
generated
File diff suppressed because one or more lines are too long
@@ -234,6 +234,11 @@ class NodeStub(object):
|
||||
request_serializer=node__pb2.PingRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.PingResponse.FromString,
|
||||
)
|
||||
self.SetChannel = channel.unary_unary(
|
||||
'/cln.Node/SetChannel',
|
||||
request_serializer=node__pb2.SetchannelRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.SetchannelResponse.FromString,
|
||||
)
|
||||
self.SignMessage = channel.unary_unary(
|
||||
'/cln.Node/SignMessage',
|
||||
request_serializer=node__pb2.SignmessageRequest.SerializeToString,
|
||||
@@ -513,6 +518,12 @@ class NodeServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def SetChannel(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def SignMessage(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
@@ -748,6 +759,11 @@ def add_NodeServicer_to_server(servicer, server):
|
||||
request_deserializer=node__pb2.PingRequest.FromString,
|
||||
response_serializer=node__pb2.PingResponse.SerializeToString,
|
||||
),
|
||||
'SetChannel': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.SetChannel,
|
||||
request_deserializer=node__pb2.SetchannelRequest.FromString,
|
||||
response_serializer=node__pb2.SetchannelResponse.SerializeToString,
|
||||
),
|
||||
'SignMessage': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.SignMessage,
|
||||
request_deserializer=node__pb2.SignmessageRequest.FromString,
|
||||
@@ -1516,6 +1532,23 @@ class Node(object):
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def SetChannel(request,
|
||||
target,
|
||||
options=(),
|
||||
channel_credentials=None,
|
||||
call_credentials=None,
|
||||
insecure=False,
|
||||
compression=None,
|
||||
wait_for_ready=None,
|
||||
timeout=None,
|
||||
metadata=None):
|
||||
return grpc.experimental.unary_unary(request, target, '/cln.Node/SetChannel',
|
||||
node__pb2.SetchannelRequest.SerializeToString,
|
||||
node__pb2.SetchannelResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def SignMessage(request,
|
||||
target,
|
||||
|
||||
Reference in New Issue
Block a user