mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 12:56:12 +00:00
Remove error-chain dependency (#6628)
* remove error-chain dependency * rerun CI * rerun CI
This commit is contained in:
@@ -20,7 +20,7 @@ use crate::types::{
|
||||
};
|
||||
use crate::EnrExt;
|
||||
use crate::Eth2Enr;
|
||||
use crate::{error, metrics, Enr, NetworkGlobals, PubsubMessage, TopicHash};
|
||||
use crate::{metrics, Enr, NetworkGlobals, PubsubMessage, TopicHash};
|
||||
use api_types::{AppRequestId, PeerRequestId, RequestId, Response};
|
||||
use futures::stream::StreamExt;
|
||||
use gossipsub::{
|
||||
@@ -170,7 +170,7 @@ impl<E: EthSpec> Network<E> {
|
||||
executor: task_executor::TaskExecutor,
|
||||
mut ctx: ServiceContext<'_>,
|
||||
log: &slog::Logger,
|
||||
) -> error::Result<(Self, Arc<NetworkGlobals<E>>)> {
|
||||
) -> Result<(Self, Arc<NetworkGlobals<E>>), String> {
|
||||
let log = log.new(o!("service"=> "libp2p"));
|
||||
|
||||
let config = ctx.config.clone();
|
||||
@@ -515,7 +515,7 @@ impl<E: EthSpec> Network<E> {
|
||||
/// - Starts listening in the given ports.
|
||||
/// - Dials boot-nodes and libp2p peers.
|
||||
/// - Subscribes to starting gossipsub topics.
|
||||
async fn start(&mut self, config: &crate::NetworkConfig) -> error::Result<()> {
|
||||
async fn start(&mut self, config: &crate::NetworkConfig) -> Result<(), String> {
|
||||
let enr = self.network_globals.local_enr();
|
||||
info!(self.log, "Libp2p Starting"; "peer_id" => %enr.peer_id(), "bandwidth_config" => format!("{}-{}", config.network_load, NetworkLoad::from(config.network_load).name));
|
||||
debug!(self.log, "Attempting to open listening ports"; config.listen_addrs(), "discovery_enabled" => !config.disable_discovery, "quic_enabled" => !config.disable_quic_support);
|
||||
@@ -920,7 +920,7 @@ impl<E: EthSpec> Network<E> {
|
||||
&mut self,
|
||||
active_validators: usize,
|
||||
current_slot: Slot,
|
||||
) -> error::Result<()> {
|
||||
) -> Result<(), String> {
|
||||
let (beacon_block_params, beacon_aggregate_proof_params, beacon_attestation_subnet_params) =
|
||||
self.score_settings
|
||||
.get_dynamic_topic_params(active_validators, current_slot)?;
|
||||
|
||||
Reference in New Issue
Block a user