MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / open_db

Function open_db

fendermint/app/src/service/node.rs:238–250  ·  view source on GitHub ↗

Open database with all

(settings: &Settings, ns: &Namespaces)

Source from the content-addressed store, hash-verified

236
237/// Open database with all
238fn open_db(settings: &Settings, ns: &Namespaces) -> anyhow::Result<RocksDb> {
239 let path = settings.data_dir().join("rocksdb");
240 info!(
241 path = path.to_string_lossy().into_owned(),
242 "opening database"
243 );
244 let config = RocksDbConfig {
245 compaction_style: settings.db.compaction_style.to_string(),
246 ..Default::default()
247 };
248 let db = RocksDb::open_cf(path, &config, ns.values().iter())?;
249 Ok(db)
250}
251
252fn to_address(sk: &fendermint_crypto::SecretKey, kind: &AccountKind) -> anyhow::Result<Address> {
253 let pk = sk.public_key().serialize();

Callers 2

load_carFunction · 0.85
runFunction · 0.85

Calls 4

to_stringMethod · 0.80
valuesMethod · 0.80
joinMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected