mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Remove unused var from block_producer
It was made redundant when `proposer_slots` was removed.
This commit is contained in:
@@ -4,7 +4,7 @@ mod traits;
|
||||
use slot_clock::SlotClock;
|
||||
use ssz::ssz_encode;
|
||||
use std::sync::Arc;
|
||||
use types::{BeaconBlock, ChainSpec, PublicKey, Slot};
|
||||
use types::{BeaconBlock, ChainSpec, Slot};
|
||||
|
||||
pub use self::traits::{
|
||||
BeaconNode, BeaconNodeError, DutiesReader, DutiesReaderError, PublishOutcome, Signer,
|
||||
@@ -48,7 +48,6 @@ pub enum Error {
|
||||
/// Relies upon an external service to keep the `EpochDutiesMap` updated.
|
||||
pub struct BlockProducer<T: SlotClock, U: BeaconNode, V: DutiesReader, W: Signer> {
|
||||
pub last_processed_slot: Option<Slot>,
|
||||
pubkey: PublicKey,
|
||||
spec: Arc<ChainSpec>,
|
||||
epoch_map: Arc<V>,
|
||||
slot_clock: Arc<T>,
|
||||
@@ -60,7 +59,6 @@ impl<T: SlotClock, U: BeaconNode, V: DutiesReader, W: Signer> BlockProducer<T, U
|
||||
/// Returns a new instance where `last_processed_slot == 0`.
|
||||
pub fn new(
|
||||
spec: Arc<ChainSpec>,
|
||||
pubkey: PublicKey,
|
||||
epoch_map: Arc<V>,
|
||||
slot_clock: Arc<T>,
|
||||
beacon_node: Arc<U>,
|
||||
@@ -68,7 +66,6 @@ impl<T: SlotClock, U: BeaconNode, V: DutiesReader, W: Signer> BlockProducer<T, U
|
||||
) -> Self {
|
||||
Self {
|
||||
last_processed_slot: None,
|
||||
pubkey,
|
||||
spec,
|
||||
epoch_map,
|
||||
slot_clock,
|
||||
@@ -238,11 +235,9 @@ mod tests {
|
||||
let produce_epoch = produce_slot.epoch(spec.epoch_length);
|
||||
epoch_map.map.insert(produce_epoch, produce_slot);
|
||||
let epoch_map = Arc::new(epoch_map);
|
||||
let keypair = Keypair::random();
|
||||
|
||||
let mut block_producer = BlockProducer::new(
|
||||
spec.clone(),
|
||||
keypair.pk.clone(),
|
||||
epoch_map.clone(),
|
||||
slot_clock.clone(),
|
||||
beacon_node.clone(),
|
||||
|
||||
Reference in New Issue
Block a user