Deleted comment code related to PoW

This commit is contained in:
Luke Parker 2022-10-30 10:10:17 -04:00
parent 3d7c12adcd
commit a0e0545c49
No known key found for this signature in database
GPG key ID: F9F1386DB1E119B6

View file

@ -85,50 +85,3 @@ impl TendermintValidator for TendermintValidatorFirm {
type Network = Arc<NetworkService<Block, <Block as BlockTrait>::Hash>>;
}
/*
// If we're an authority, produce blocks
pub fn authority<S: sp_consensus::SelectChain<Block> + 'static>(
task_manager: &TaskManager,
client: Arc<FullClient>,
network: Arc<sc_network::NetworkService<Block, <Block as sp_runtime::traits::Block>::Hash>>,
pool: Arc<sc_transaction_pool::FullPool<Block, FullClient>>,
select_chain: S,
registry: Option<&Registry>,
) {
let proposer = sc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
pool,
registry,
None,
);
let pow_block_import = Box::new(sc_pow::PowBlockImport::new(
client.clone(),
client.clone(),
algorithm::AcceptAny,
0, // Block to start checking inherents at
select_chain.clone(),
move |_, _| async { Ok(sp_timestamp::InherentDataProvider::from_system_time()) },
));
let (worker, worker_task) = sc_pow::start_mining_worker(
pow_block_import,
client,
select_chain,
algorithm::AcceptAny,
proposer,
network.clone(),
network,
None,
move |_, _| async { Ok(sp_timestamp::InherentDataProvider::from_system_time()) },
Duration::from_secs(6),
Duration::from_secs(2),
);
task_manager.spawn_essential_handle().spawn_blocking("pow", None, worker_task);
task_manager.spawn_essential_handle().spawn("producer", None, produce(worker));
}
*/