Function sovrin::api::pool::sovrin_open_pool_ledger
[−]
[src]
#[no_mangle]pub extern "C" fn sovrin_open_pool_ledger(
command_handle: i32,
config_name: *const c_char,
config: *const c_char,
cb: Option<extern "C" fn(_: i32, _: ErrorCode, _: i32)>
) -> ErrorCode
Opens pool ledger and performs connecting to pool nodes.
Pool ledger configuration with corresponded name must be previously created with sovrin_create_pool_ledger_config method. It is impossible to open pool with the same name more than once.
config_name: Name of the pool ledger configuration. config (optional): Runtime pool configuration json. if NULL, then default config will be used. Example: { "refreshOnOpen": bool (optional), Forces pool ledger to be refreshed immediately after opening. Defaults to true. "autoRefreshTime": int (optional), After this time in minutes pool ledger will be automatically refreshed. Use 0 to disable automatic refresh. Defaults to 24*60. "networkTimeout": int (optional), Network timeout for communication with nodes in milliseconds. Defaults to 20000. }
Returns
Handle to opened pool to use in methods that require pool connection.
Errors
Common* Ledger*