Search in sources :

Example 1 with PingMessageHandler

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);
}
Also used : SingleProtocolEth2RpcMethod(tech.pegasys.teku.networking.eth2.rpc.core.methods.SingleProtocolEth2RpcMethod) PingMessageHandler(tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.PingMessageHandler) PingMessage(tech.pegasys.teku.spec.datastructures.networking.libp2p.rpc.PingMessage)

Aggregations

PingMessageHandler (tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.PingMessageHandler)1 SingleProtocolEth2RpcMethod (tech.pegasys.teku.networking.eth2.rpc.core.methods.SingleProtocolEth2RpcMethod)1 PingMessage (tech.pegasys.teku.spec.datastructures.networking.libp2p.rpc.PingMessage)1