Skip to content

Commit

Permalink
Fix chain_spec for BlockService
Browse files Browse the repository at this point in the history
  • Loading branch information
dknopik committed Dec 13, 2024
1 parent 38c9dd6 commit b96b046
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions validator_client/validator_services/src/block_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub struct BlockServiceBuilder<S, T, E: EthSpec> {
beacon_nodes: Option<Arc<BeaconNodeFallback<T, E>>>,
proposer_nodes: Option<Arc<BeaconNodeFallback<T, E>>>,
executor: Option<TaskExecutor>,
chain_spec: Option<ChainSpec>,
chain_spec: Option<Arc<ChainSpec>>,
graffiti: Option<Graffiti>,
graffiti_file: Option<GraffitiFile>,
}
Expand Down Expand Up @@ -95,6 +95,11 @@ impl<S: ValidatorStore<E>, T: SlotClock + 'static, E: EthSpec> BlockServiceBuild
self
}

pub fn chain_spec(mut self, chain_spec: Arc<ChainSpec>) -> Self {
self.chain_spec = Some(chain_spec);
self
}

pub fn graffiti(mut self, graffiti: Option<Graffiti>) -> Self {
self.graffiti = graffiti;
self
Expand Down Expand Up @@ -189,7 +194,7 @@ pub struct Inner<S, T, E: EthSpec> {
pub beacon_nodes: Arc<BeaconNodeFallback<T, E>>,
pub proposer_nodes: Option<Arc<BeaconNodeFallback<T, E>>>,
executor: TaskExecutor,
chain_spec: ChainSpec,
chain_spec: Arc<ChainSpec>,
graffiti: Option<Graffiti>,
graffiti_file: Option<GraffitiFile>,
}
Expand Down

0 comments on commit b96b046

Please sign in to comment.