use of tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.PingMessageHandler in project teku by ConsenSys.
the class BeaconChainMethods method createPing.
private static Eth2RpcMethod<PingMessage, PingMessage> createPing(final AsyncRunner asyncRunner, final MetadataMessagesFactory metadataMessagesFactory, final PeerLookup peerLookup, final RpcEncoding rpcEncoding) {
final PingMessageHandler statusHandler = new PingMessageHandler(metadataMessagesFactory);
final RpcContextCodec<?, PingMessage> contextCodec = RpcContextCodec.noop(PingMessage.SSZ_SCHEMA);
return new SingleProtocolEth2RpcMethod<>(asyncRunner, BeaconChainMethodIds.PING, 1, rpcEncoding, PingMessage.SSZ_SCHEMA, true, contextCodec, statusHandler, peerLookup);
}
Aggregations