use of com.jd.blockchain.consensus.ConsensusViewSettings in project jdchain-core by blockchain-jd-com.
the class LedgerInitConfiguration method createConsensusConfig.
private static ConsensusConfig createConsensusConfig(LedgerInitProperties initProps) {
ConsensusProvider consensusProvider = ConsensusProviders.getProvider(initProps.getConsensusProvider());
Properties csProps = initProps.getConsensusConfig();
ConsensusViewSettings protocolSettings = consensusProvider.getSettingsFactory().getConsensusSettingsBuilder().createSettings(csProps, ParticipantReplica.wrap(initProps.getConsensusParticipantNodes()));
ConsensusConfig config = new ConsensusConfig();
config.setProvider(consensusProvider);
config.setProtocolSettings(protocolSettings);
return config;
}
Aggregations