[−][src]Function grin_api::start_rest_apis
pub fn start_rest_apis(
addr: String,
chain: Arc<Chain>,
tx_pool: Arc<RwLock<TransactionPool>>,
peers: Arc<Peers>,
api_secret: Option<String>,
tls_config: Option<TLSConfig>
) -> bool
Start all server HTTP handlers. Register all of them with Router and runs the corresponding HTTP server.
Hyper currently has a bug that prevents clean shutdown. In order to avoid having references kept forever by handlers, we only pass weak references. Note that this likely means a crash if the handlers are used after a server shutdown (which should normally never happen, except during tests).