작업 증명을 사용하는 체인 구성
사용 사례
미리보기 단계
sc_consensus_pow 및 sc_service를 사용하여 전체 노드 정의
let pow_block_import = sc_consensus_pow::PowBlockImport::new(
client.clone(),
client.clone(),
sha3pow::MinimalSha3Algorithm,
0, // 블록 0부터 inherents 확인
select_chain.clone(),
inherent_data_providers.clone(),
can_author_with,
);
let import_queue = sc_consensus_pow::import_queue(
Box::new(pow_block_import.clone()),
None,
sha3pow::MinimalSha3Algorithm, // 클라이언트에 대한 참조를 제공합니다.
inherent_data_providers.clone(),
&task_manager.spawn_handle(),
config.prometheus_registry(),
)?;가져오기 대기열 생성
proposer 및 worker 정의
예제
자원
Last updated