public MothraPeeringWorker(ILogger <MothraPeeringWorker> logger, IOptionsMonitor <MothraConfiguration> mothraConfigurationOptions, IHostEnvironment environment, IClientVersion clientVersion, IStore store, IMothraLibp2p mothraLibp2P, DataDirectory dataDirectory, PeerManager peerManager, PeerDiscoveredProcessor peerDiscoveredProcessor, RpcPeeringStatusProcessor rpcPeeringStatusProcessor, RpcBeaconBlocksByRangeProcessor rpcBeaconBlocksByRangeProcessor, SignedBeaconBlockProcessor signedBeaconBlockProcessor) { _logger = logger; _environment = environment; _clientVersion = clientVersion; _dataDirectory = dataDirectory; _mothraConfigurationOptions = mothraConfigurationOptions; _mothraLibp2P = mothraLibp2P; _peerManager = peerManager; _peerDiscoveredProcessor = peerDiscoveredProcessor; _rpcPeeringStatusProcessor = rpcPeeringStatusProcessor; _rpcBeaconBlocksByRangeProcessor = rpcBeaconBlocksByRangeProcessor; _signedBeaconBlockProcessor = signedBeaconBlockProcessor; _store = store; // 396 bytes _minimumSignedBeaconBlockLength = Ssz.Ssz.SignedBeaconBlockLength( new SignedBeaconBlock(new BeaconBlock(Slot.Zero, Root.Zero, Root.Zero, BeaconBlockBody.Zero), BlsSignature.Zero)); }
public static void SendRpcResponse(this IMothraLibp2p mothraLibp2p, string method, string peer, ReadOnlySpan <byte> data) { byte[] methodUtf8 = Encoding.UTF8.GetBytes(method); byte[] peerUtf8 = Encoding.UTF8.GetBytes(peer); mothraLibp2p.SendRpcResponse(methodUtf8, peerUtf8, data); }
public MothraNetworkPeering(ILogger <MothraNetworkPeering> logger, IMothraLibp2p mothraLibp2p, PeerManager peerManager) { _logger = logger; _mothraLibp2p = mothraLibp2p; _peerManager = peerManager; }
public MothraNetworkPeering(ILogger <MothraNetworkPeering> logger, IOptionsMonitor <NetworkingConfiguration> networkingConfigurationOptions, IMothraLibp2p mothraLibp2p, PeerManager peerManager) { _logger = logger; _networkingConfigurationOptions = networkingConfigurationOptions; _mothraLibp2p = mothraLibp2p; _peerManager = peerManager; }
public static void SendGossip(this IMothraLibp2p mothraLibp2p, string topic, ReadOnlySpan <byte> data) { byte[] topicUtf8 = Encoding.UTF8.GetBytes(topic); mothraLibp2p.SendGossip(topicUtf8, data); }