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 19, 2024
1 parent 79367de commit 838eed6
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> {
beacon_nodes: Option<Arc<BeaconNodeFallback<T>>>,
proposer_nodes: Option<Arc<BeaconNodeFallback<T>>>,
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, T: SlotClock + 'static> BlockServiceBuilder<S, T> {
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> {
pub beacon_nodes: Arc<BeaconNodeFallback<T>>,
pub proposer_nodes: Option<Arc<BeaconNodeFallback<T>>>,
executor: TaskExecutor,
chain_spec: ChainSpec,
chain_spec: Arc<ChainSpec>,
graffiti: Option<Graffiti>,
graffiti_file: Option<GraffitiFile>,
}
Expand Down

0 comments on commit 838eed6

Please sign in to comment.