|
|
|
@ -14,6 +14,7 @@ |
|
|
|
|
*/ |
|
|
|
|
package org.hyperledger.besu.ethereum.api.jsonrpc.methods; |
|
|
|
|
|
|
|
|
|
import org.hyperledger.besu.ethereum.api.graphql.GraphQLConfiguration; |
|
|
|
|
import org.hyperledger.besu.ethereum.api.jsonrpc.JsonRpcConfiguration; |
|
|
|
|
import org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis; |
|
|
|
|
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod; |
|
|
|
@ -37,18 +38,21 @@ public class NetJsonRpcMethods extends ApiGroupJsonRpcMethods { |
|
|
|
|
private final JsonRpcConfiguration jsonRpcConfiguration; |
|
|
|
|
private final WebSocketConfiguration webSocketConfiguration; |
|
|
|
|
private final MetricsConfiguration metricsConfiguration; |
|
|
|
|
private final GraphQLConfiguration graphQLConfiguration; |
|
|
|
|
|
|
|
|
|
public NetJsonRpcMethods( |
|
|
|
|
final P2PNetwork p2pNetwork, |
|
|
|
|
final BigInteger networkId, |
|
|
|
|
final JsonRpcConfiguration jsonRpcConfiguration, |
|
|
|
|
final WebSocketConfiguration webSocketConfiguration, |
|
|
|
|
final MetricsConfiguration metricsConfiguration) { |
|
|
|
|
final MetricsConfiguration metricsConfiguration, |
|
|
|
|
final GraphQLConfiguration graphQLConfiguration) { |
|
|
|
|
this.p2pNetwork = p2pNetwork; |
|
|
|
|
this.networkId = networkId; |
|
|
|
|
this.jsonRpcConfiguration = jsonRpcConfiguration; |
|
|
|
|
this.webSocketConfiguration = webSocketConfiguration; |
|
|
|
|
this.metricsConfiguration = metricsConfiguration; |
|
|
|
|
this.graphQLConfiguration = graphQLConfiguration; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -64,6 +68,10 @@ public class NetJsonRpcMethods extends ApiGroupJsonRpcMethods { |
|
|
|
|
new NetPeerCount(p2pNetwork), |
|
|
|
|
new NetEnode(p2pNetwork), |
|
|
|
|
new NetServices( |
|
|
|
|
jsonRpcConfiguration, webSocketConfiguration, p2pNetwork, metricsConfiguration)); |
|
|
|
|
jsonRpcConfiguration, |
|
|
|
|
webSocketConfiguration, |
|
|
|
|
p2pNetwork, |
|
|
|
|
metricsConfiguration, |
|
|
|
|
graphQLConfiguration)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|