Function indyrs::pool::open_pool_ledger [−][src]
pub fn open_pool_ledger(
pool_name: &str,
config: Option<&str>
) -> Box<dyn Future<Item = CommandHandle, Error = IndyError>>
Opens pool ledger and performs connecting to pool nodes.
Pool ledger configuration with corresponded name must be previously created with indy_create_pool_ledger_config method. It is impossible to open pool with the same name more than once.
Arguments
config_name
- Name of the pool ledger configuration.config
(optional)- Runtime pool configuration json. if NULL, then default config will be used. Example: { "timeout": int (optional), timeout for network request (in sec). "extended_timeout": int (optional), extended timeout for network request (in sec). "preordered_nodes": array- (optional), names of nodes which will have a priority during request sending: ["name_of_1st_prior_node", "name_of_2nd_prior_node", .... ] This can be useful if a user prefers querying specific nodes. Assume that Node1
andNode2
nodes reply faster. If you pass them Libindy always sends a read request to these nodes first and only then (if not enough) to others. Note: Nodes not specified will be placed randomly. "number_read_nodes": int (optional) - the number of nodes to send read requests (2 by default) By default Libindy sends a read requests to 2 nodes in the pool. If response isn't received orstate proof
is invalid Libindy sends the request again but to 2 (number_read_nodes
) * 2 = 4 nodes and so far until completion. }
Returns
Handle to opened pool to use in methods that require pool connection.