fn create_database_client_and_runtime(
    channel_buffer: usize,
) -> (MockLibraDB, JsonRpcAsyncClient, Runtime) {
    let mock_db = mock_db();

    let host = "0.0.0.0";
    let port = utils::get_available_port();
    let address = format!("{}:{}", host, port);
    let mp_sender = channel(channel_buffer).0;

    let runtime = test_bootstrap(
        address.parse().unwrap(),
        Arc::new(mock_db.clone()),
        mp_sender,
    );
    let client = JsonRpcAsyncClient::new(
        reqwest::Url::from_str(format!("http://127.0.0.1:{}", port).as_str()).expect("invalid url"),
    );

    (mock_db, client, runtime)
}
/// Creates and returns a MockLibraDB, JsonRpcAsyncClient and corresponding server Runtime tuple for
/// testing. The given channel_buffer specifies the buffer size of the mempool client sender channel.
Creates and returns a MockLibraDB, JsonRpcAsyncClient and corresponding server Runtime tuple for
testing. The given channel_buffer specifies the buffer size of the mempool client sender channel.
Creates and returns a MockLibraDB JsonRpcAsyncClient and corresponding server Runtime tuple for testing . The given channel_buffer specifies the buffer size of the mempool client sender channel .
fn create_database_client_and_runtime(
    channel_buffer: usize,
) -> (MockLibraDB, JsonRpcAsyncClient, Runtime) {
    let mock_db = mock_db();
    let host = "0.0.0.0";
    let port = utils::get_available_port();
    let address = format!("{}:{}", host, port);
    let mp_sender = channel(channel_buffer).0;
    let runtime = test_bootstrap(
        address.parse().unwrap(),
        Arc::new(mock_db.clone()),
        mp_sender,
    );
    let client = JsonRpcAsyncClient::new(
        reqwest::Url::from_str(format!("http://127.0.0.1:{}", port).as_str()).expect("invalid url"),
    );
    (mock_db, client, runtime)
}
fn create_database_client_and_runtime ( channel_buffer : usize , ) -> ( MockLibraDB , JsonRpcAsyncClient , Runtime ) { let mock_db = mock_db ( ) ; let host = " " ; let port = utils :: get_available_port ( ) ; let address = format ! ( " " host port ) ; let mp_sender = channel ( channel_buffer ) . 0 ; let runtime = test_bootstrap ( address . parse ( ) . unwrap ( ) , Arc :: new ( mock_db . clone ( ) ) , mp_sender , ) ; let client = JsonRpcAsyncClient :: new ( reqwest :: Url :: from_str ( format ! ( " " port ) . as_str ( ) ) . expect ( " " ) , ) ; ( mock_db , client , runtime ) }
Creates and returns a MockLibraDB, JsonRpcAsyncClient and corresponding server Runtime tuple for
testing.
Creates and returns a MockLibraDB JsonRpcAsyncClient and corresponding server Runtime tuple for testing .
channel_buffer
usize
channel_buffer
usize