Search in sources :

Example 1 with QbftGetPendingVotes

use of org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetPendingVotes in project besu by hyperledger.

the class QbftJsonRpcMethods method create.

@Override
protected Map<String, JsonRpcMethod> create() {
    final BlockchainQueries blockchainQueries = new BlockchainQueries(context.getBlockchain(), context.getWorldStateArchive());
    final BftContext bftContext = context.getConsensusContext(BftContext.class);
    final BlockInterface blockInterface = bftContext.getBlockInterface();
    final ValidatorProvider validatorProvider = bftContext.getValidatorProvider();
    return mapOf(new QbftProposeValidatorVote(validatorProvider), new QbftGetValidatorsByBlockNumber(blockchainQueries, readOnlyValidatorProvider), new QbftDiscardValidatorVote(validatorProvider), new QbftGetValidatorsByBlockHash(context.getBlockchain(), readOnlyValidatorProvider), new QbftGetSignerMetrics(readOnlyValidatorProvider, blockInterface, blockchainQueries), new QbftGetPendingVotes(validatorProvider));
}
Also used : QbftProposeValidatorVote(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftProposeValidatorVote) BftContext(org.hyperledger.besu.consensus.common.bft.BftContext) BlockchainQueries(org.hyperledger.besu.ethereum.api.query.BlockchainQueries) QbftGetValidatorsByBlockNumber(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetValidatorsByBlockNumber) BlockInterface(org.hyperledger.besu.consensus.common.BlockInterface) QbftGetValidatorsByBlockHash(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetValidatorsByBlockHash) QbftDiscardValidatorVote(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftDiscardValidatorVote) ValidatorProvider(org.hyperledger.besu.consensus.common.validator.ValidatorProvider) QbftGetSignerMetrics(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetSignerMetrics) QbftGetPendingVotes(org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetPendingVotes)

Aggregations

BlockInterface (org.hyperledger.besu.consensus.common.BlockInterface)1 BftContext (org.hyperledger.besu.consensus.common.bft.BftContext)1 ValidatorProvider (org.hyperledger.besu.consensus.common.validator.ValidatorProvider)1 QbftDiscardValidatorVote (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftDiscardValidatorVote)1 QbftGetPendingVotes (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetPendingVotes)1 QbftGetSignerMetrics (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetSignerMetrics)1 QbftGetValidatorsByBlockHash (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetValidatorsByBlockHash)1 QbftGetValidatorsByBlockNumber (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftGetValidatorsByBlockNumber)1 QbftProposeValidatorVote (org.hyperledger.besu.consensus.qbft.jsonrpc.methods.QbftProposeValidatorVote)1 BlockchainQueries (org.hyperledger.besu.ethereum.api.query.BlockchainQueries)1