Function holochain::conductor::conductor::integration_dump
source · pub async fn integration_dump(
vault: &DbRead<DbKindDht>
) -> ConductorApiResult<IntegrationStateDump>
Expand description
Dump the integration json state.
Examples found in repository?
More examples
src/conductor/conductor.rs (line 1911)
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917
pub async fn dump_cell_state(&self, cell_id: &CellId) -> ConductorApiResult<String> {
let cell = self.cell_by_id(cell_id)?;
let authored_db = cell.authored_db();
let dht_db = cell.dht_db();
let space = cell_id.dna_hash();
let p2p_agents_db = self.p2p_agents_db(space);
let peer_dump =
p2p_agent_store::dump_state(p2p_agents_db.into(), Some(cell_id.clone())).await?;
let source_chain_dump = source_chain::dump_state(
authored_db.clone().into(),
cell_id.agent_pubkey().clone(),
)
.await?;
let out = JsonDump {
peer_dump,
source_chain_dump,
integration_dump: integration_dump(&dht_db.clone().into()).await?,
};
// Add summary
let summary = out.to_string();
let out = (out, summary);
Ok(serde_json::to_string_pretty(&out)?)
}