cargo fmt
This commit is contained in:
parent
12b5e9ad3d
commit
c3ced28095
@ -4251,31 +4251,6 @@ pub fn serve<T: BeaconChainTypes>(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// POST lighthouse/database/historical_blocks
|
|
||||||
let post_lighthouse_database_historical_blocks = database_path
|
|
||||||
.and(warp::path("historical_blocks"))
|
|
||||||
.and(warp::path::end())
|
|
||||||
.and(warp::body::json())
|
|
||||||
.and(task_spawner_filter.clone())
|
|
||||||
.and(chain_filter.clone())
|
|
||||||
.and(log_filter.clone())
|
|
||||||
.and_then(
|
|
||||||
|blocks: Vec<Arc<SignedBlindedBeaconBlock<T::EthSpec>>>,
|
|
||||||
task_spawner: TaskSpawner<T::EthSpec>,
|
|
||||||
chain: Arc<BeaconChain<T>>,
|
|
||||||
log: Logger| {
|
|
||||||
info!(
|
|
||||||
log,
|
|
||||||
"Importing historical blocks";
|
|
||||||
"count" => blocks.len(),
|
|
||||||
"source" => "http_api"
|
|
||||||
);
|
|
||||||
task_spawner.blocking_json_task(Priority::P1, move || {
|
|
||||||
database::historical_blocks(chain, blocks)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
// GET lighthouse/analysis/block_rewards
|
// GET lighthouse/analysis/block_rewards
|
||||||
let get_lighthouse_block_rewards = warp::path("lighthouse")
|
let get_lighthouse_block_rewards = warp::path("lighthouse")
|
||||||
.and(warp::path("analysis"))
|
.and(warp::path("analysis"))
|
||||||
|
@ -5,7 +5,8 @@ mod tests {
|
|||||||
use crate::{NetworkConfig, NetworkService};
|
use crate::{NetworkConfig, NetworkService};
|
||||||
use beacon_chain::test_utils::BeaconChainHarness;
|
use beacon_chain::test_utils::BeaconChainHarness;
|
||||||
use beacon_processor::{
|
use beacon_processor::{
|
||||||
BeaconProcessorChannels, BeaconProcessorSend, MAX_SCHEDULED_WORK_QUEUE_LEN, MAX_WORK_EVENT_QUEUE_LEN,
|
BeaconProcessorChannels, BeaconProcessorSend, MAX_SCHEDULED_WORK_QUEUE_LEN,
|
||||||
|
MAX_WORK_EVENT_QUEUE_LEN,
|
||||||
};
|
};
|
||||||
use lighthouse_network::Enr;
|
use lighthouse_network::Enr;
|
||||||
use slog::{o, Drain, Level, Logger};
|
use slog::{o, Drain, Level, Logger};
|
||||||
|
Loading…
Reference in New Issue
Block a user