Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign of how JsonRpcMethods are created #159

Merged
merged 4 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Consensus APIs
Signed-off-by: Christopher Hare <chris.hare@consensys.net>
  • Loading branch information
Christopher Hare committed Nov 5, 2019
commit df52f147738e459f6dd4d0247c0146bab3a8c17d
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.hyperledger.besu.ethereum.chain.MutableBlockchain;
import org.hyperledger.besu.ethereum.worldstate.WorldStateArchive;

import java.util.Collection;
import java.util.Map;

public class CliqueJsonRpcMethods extends ApiGroupJsonRpcMethods {
Expand All @@ -48,8 +47,8 @@ public CliqueJsonRpcMethods(final ProtocolContext<CliqueContext> context) {
}

@Override
protected boolean isWithin(Collection<RpcApi> apis) {
return apis.contains(CliqueRpcApis.CLIQUE);
protected RpcApi getApiGroup() {
return CliqueRpcApis.CLIQUE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.hyperledger.besu.ethereum.api.jsonrpc.methods.ApiGroupJsonRpcMethods;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;

import java.util.Collection;
import java.util.Map;

public class IbftJsonRpcMethods extends ApiGroupJsonRpcMethods {
Expand All @@ -44,8 +43,8 @@ public IbftJsonRpcMethods(final ProtocolContext<IbftContext> context) {
}

@Override
protected boolean isWithin(Collection<RpcApi> apis) {
return apis.contains(IbftRpcApis.IBFT);
protected RpcApi getApiGroup() {
return IbftRpcApis.IBFT;
}

@Override
Expand Down