Warn when external rpc process is enabled (#4878)
This commit is contained in:
		
					parent
					
						
							
								d697d5fb6a
							
						
					
				
			
			
				commit
				
					
						e404a81e6f
					
				
			
		
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -170,6 +170,8 @@ void nano::daemon::run (std::filesystem::path const & data_path, nano::node_flag
 | 
				
			||||||
						throw std::runtime_error (std::string ("RPC is configured to spawn a new process however the file cannot be found at: ") + config.rpc.child_process.rpc_path);
 | 
											throw std::runtime_error (std::string ("RPC is configured to spawn a new process however the file cannot be found at: ") + config.rpc.child_process.rpc_path);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										logger.warn (nano::log::type::daemon, "RPC is configured to run in a separate process, this is experimental and is not recommended for production use. Please consider using the in-process RPC instead.");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					std::string network{ node->network_params.network.get_current_network_as_string () };
 | 
										std::string network{ node->network_params.network.get_current_network_as_string () };
 | 
				
			||||||
					rpc_process = std::make_unique<boost::process::child> (config.rpc.child_process.rpc_path, "--daemon", "--data_path", data_path.string (), "--network", network);
 | 
										rpc_process = std::make_unique<boost::process::child> (config.rpc.child_process.rpc_path, "--daemon", "--data_path", data_path.string (), "--network", network);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue