mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-24 11:36:18 +00:00
Deleted comment code related to PoW
This commit is contained in:
parent
3d7c12adcd
commit
a0e0545c49
1 changed files with 0 additions and 47 deletions
|
@ -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));
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue