File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,24 +112,24 @@ class FfiNetworkGraph {
112112 });
113113
114114 /// Returns information on a channel with the given id.
115- Future <ChannelInfo ?> channel ({required BigInt shortChannelId}) =>
116- core.instance.api.crateApiGraphFfiNetworkGraphChannel (
115+ Future <ChannelInfo ?> channelUnsafe ({required BigInt shortChannelId}) =>
116+ core.instance.api.crateApiGraphFfiNetworkGraphChannelUnsafe (
117117 that: this , shortChannelId: shortChannelId);
118118
119119 /// Returns the list of channels in the graph
120- Future <Uint64List > listChannels () =>
121- core.instance.api.crateApiGraphFfiNetworkGraphListChannels (
120+ Future <Uint64List > listChannelsUnsafe () =>
121+ core.instance.api.crateApiGraphFfiNetworkGraphListChannelsUnsafe (
122122 that: this ,
123123 );
124124
125125 /// Returns the list of nodes in the graph
126- Future <List <NodeId >> listNodes () =>
127- core.instance.api.crateApiGraphFfiNetworkGraphListNodes (
126+ Future <List <NodeId >> listNodesUnsafe () =>
127+ core.instance.api.crateApiGraphFfiNetworkGraphListNodesUnsafe (
128128 that: this ,
129129 );
130130
131- Future <NodeInfo ?> node ({required NodeId nodeId}) => core.instance.api
132- .crateApiGraphFfiNetworkGraphNode (that: this , nodeId: nodeId);
131+ Future <NodeInfo ?> nodeUnsafe ({required NodeId nodeId}) => core.instance.api
132+ .crateApiGraphFfiNetworkGraphNodeUnsafe (that: this , nodeId: nodeId);
133133
134134 @override
135135 int get hashCode => opaque.hashCode;
Original file line number Diff line number Diff line change @@ -143,25 +143,25 @@ impl From<ldk_node::graph::NetworkGraph> for FfiNetworkGraph {
143143
144144impl FfiNetworkGraph {
145145 /// Returns the list of channels in the graph
146- pub fn list_channels ( & self ) -> Vec < u64 > {
146+ pub fn list_channels_unsafe ( & self ) -> Vec < u64 > {
147147 self . opaque . list_channels ( )
148148 }
149149
150150 /// Returns information on a channel with the given id.
151- pub fn channel ( & self , short_channel_id : u64 ) -> Option < ChannelInfo > {
151+ pub fn channel_unsafe ( & self , short_channel_id : u64 ) -> Option < ChannelInfo > {
152152 self . opaque . channel ( short_channel_id) . map ( |e| e. into ( ) )
153153 }
154154
155155 /// Returns the list of nodes in the graph
156- pub fn list_nodes ( & self ) -> Vec < NodeId > {
156+ pub fn list_nodes_unsafe ( & self ) -> Vec < NodeId > {
157157 self . opaque
158158 . list_nodes ( )
159159 . iter ( )
160160 . map ( |e| e. to_owned ( ) . into ( ) )
161161 . collect ( )
162162 }
163163
164- pub fn node ( & self , node_id : NodeId ) -> Result < Option < NodeInfo > , FfiNodeError > {
164+ pub fn node_unsafe ( & self , node_id : NodeId ) -> Result < Option < NodeInfo > , FfiNodeError > {
165165 Ok ( self . opaque . node ( & node_id. try_into ( ) ?) . map ( |e| e. into ( ) ) )
166166 }
167167}
You can’t perform that action at this time.
0 commit comments