Esempio n. 1
0
        public void ReportSyncPeerInitializeEvent(string protocol, Node node, SyncPeerNodeDetails syncPeerNodeDetails)
        {
            INodeStats stats = GetOrAdd(node);

            if (protocol == "eth")
            {
                stats.AddNodeStatsEth62InitializedEvent(syncPeerNodeDetails);
            }
            else if (protocol == "les")
            {
                stats.AddNodeStatsLesInitializedEvent(syncPeerNodeDetails);
            }
            else
            {
                throw new ArgumentException($"Unknown protocol: {protocol}");
            }
        }
Esempio n. 2
0
        public void ReportEthInitializeEvent(Node node, EthNodeDetails ethNodeDetails)
        {
            INodeStats stats = GetOrAdd(node);

            stats.AddNodeStatsEth62InitializedEvent(ethNodeDetails);
        }