mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 10:52:43 +00:00
* Verify and Store Blobs During Backfill * Improve logs * Eliminated Clone * Fix Inital Vector Capacity * Addressed Sean's Comments
21 lines
571 B
Rust
21 lines
571 B
Rust
use beacon_chain::store::metadata::CURRENT_SCHEMA_VERSION;
|
|
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
|
use eth2::lighthouse::DatabaseInfo;
|
|
use std::sync::Arc;
|
|
|
|
pub fn info<T: BeaconChainTypes>(
|
|
chain: Arc<BeaconChain<T>>,
|
|
) -> Result<DatabaseInfo, warp::Rejection> {
|
|
let store = &chain.store;
|
|
let split = store.get_split_info();
|
|
let config = store.get_config().clone();
|
|
let anchor = store.get_anchor_info();
|
|
|
|
Ok(DatabaseInfo {
|
|
schema_version: CURRENT_SCHEMA_VERSION.as_u64(),
|
|
config,
|
|
split,
|
|
anchor,
|
|
})
|
|
}
|