File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,10 @@ struct PluginState {
1717 events : broadcast:: Sender < cln_rpc:: notifications:: Notification > ,
1818}
1919
20- const OPTION_GRPC_PORT : options:: IntegerConfigOption = options:: ConfigOption :: new_i64_no_default (
20+ const OPTION_GRPC_PORT : options:: DefaultIntegerConfigOption = options:: ConfigOption :: new_i64_with_default (
2121 "grpc-port" ,
22- "Which port should the grpc plugin listen for incoming connections?" ,
22+ 9736 ,
23+ "Which port should the grpc plugin listen for incoming connections?"
2324) ;
2425
2526const OPTION_GRPC_MSG_BUFFER_SIZE : options:: DefaultIntegerConfigOption = options:: ConfigOption :: new_i64_with_default (
@@ -53,15 +54,7 @@ async fn main() -> Result<()> {
5354 None => return Ok ( ( ) ) ,
5455 } ;
5556
56- let bind_port = match plugin. option ( & OPTION_GRPC_PORT ) . unwrap ( ) {
57- Some ( port) => port,
58- None => {
59- log:: info!( "'grpc-port' options i not configured. exiting." ) ;
60- plugin. disable ( "Missing 'grpc-port' option" ) . await ?;
61- return Ok ( ( ) ) ;
62- }
63- } ;
64-
57+ let bind_port: i64 = plugin. option ( & OPTION_GRPC_PORT ) . unwrap ( ) ;
6558 let buffer_size: i64 = plugin. option ( & OPTION_GRPC_MSG_BUFFER_SIZE ) . unwrap ( ) ;
6659 let buffer_size = match usize:: try_from ( buffer_size) {
6760 Ok ( b) => b,
You can’t perform that action at this time.
0 commit comments