|
|
@ -2,6 +2,7 @@ package net.consensys.pantheon.consensus.clique.jsonrpc; |
|
|
|
|
|
|
|
|
|
|
|
import net.consensys.pantheon.consensus.clique.CliqueContext; |
|
|
|
import net.consensys.pantheon.consensus.clique.CliqueContext; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.CliqueGetSigners; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.CliqueGetSigners; |
|
|
|
|
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.CliqueGetSignersAtHash; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.Discard; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.Discard; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.Propose; |
|
|
|
import net.consensys.pantheon.consensus.clique.jsonrpc.methods.Propose; |
|
|
|
import net.consensys.pantheon.ethereum.ProtocolContext; |
|
|
|
import net.consensys.pantheon.ethereum.ProtocolContext; |
|
|
@ -22,9 +23,11 @@ public class CliqueJsonRpcMethodsFactory { |
|
|
|
final BlockchainQueries blockchainQueries = |
|
|
|
final BlockchainQueries blockchainQueries = |
|
|
|
new BlockchainQueries(blockchain, worldStateArchive); |
|
|
|
new BlockchainQueries(blockchain, worldStateArchive); |
|
|
|
final JsonRpcParameter jsonRpcParameter = new JsonRpcParameter(); |
|
|
|
final JsonRpcParameter jsonRpcParameter = new JsonRpcParameter(); |
|
|
|
|
|
|
|
|
|
|
|
final CliqueGetSigners cliqueGetSigners = |
|
|
|
final CliqueGetSigners cliqueGetSigners = |
|
|
|
new CliqueGetSigners(blockchainQueries, jsonRpcParameter); |
|
|
|
new CliqueGetSigners(blockchainQueries, jsonRpcParameter); |
|
|
|
|
|
|
|
final CliqueGetSignersAtHash cliqueGetSignersAtHash = |
|
|
|
|
|
|
|
new CliqueGetSignersAtHash(blockchainQueries, jsonRpcParameter); |
|
|
|
final Propose proposeRpc = |
|
|
|
final Propose proposeRpc = |
|
|
|
new Propose(context.getConsensusState().getVoteProposer(), jsonRpcParameter); |
|
|
|
new Propose(context.getConsensusState().getVoteProposer(), jsonRpcParameter); |
|
|
|
final Discard discardRpc = |
|
|
|
final Discard discardRpc = |
|
|
@ -32,6 +35,7 @@ public class CliqueJsonRpcMethodsFactory { |
|
|
|
|
|
|
|
|
|
|
|
final Map<String, JsonRpcMethod> rpcMethods = new HashMap<>(); |
|
|
|
final Map<String, JsonRpcMethod> rpcMethods = new HashMap<>(); |
|
|
|
rpcMethods.put(cliqueGetSigners.getName(), cliqueGetSigners); |
|
|
|
rpcMethods.put(cliqueGetSigners.getName(), cliqueGetSigners); |
|
|
|
|
|
|
|
rpcMethods.put(cliqueGetSignersAtHash.getName(), cliqueGetSignersAtHash); |
|
|
|
rpcMethods.put(proposeRpc.getName(), proposeRpc); |
|
|
|
rpcMethods.put(proposeRpc.getName(), proposeRpc); |
|
|
|
rpcMethods.put(discardRpc.getName(), discardRpc); |
|
|
|
rpcMethods.put(discardRpc.getName(), discardRpc); |
|
|
|
return rpcMethods; |
|
|
|
return rpcMethods; |
|
|
|