Open database with all
(settings: &Settings, ns: &Namespaces)
| 236 | |
| 237 | /// Open database with all |
| 238 | fn 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 | |
| 252 | fn to_address(sk: &fendermint_crypto::SecretKey, kind: &AccountKind) -> anyhow::Result<Address> { |
| 253 | let pk = sk.public_key().serialize(); |