Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
if (peer.node_count > 0) { | if (peer.node_count > 0) { | ||||
++connectedProofCount; | ++connectedProofCount; | ||||
connectedStakes += proofStake; | connectedStakes += proofStake; | ||||
} | } | ||||
}); | }); | ||||
network.pushKV("proof_count", proofCount); | network.pushKV("proof_count", proofCount); | ||||
network.pushKV("connected_proof_count", connectedProofCount); | network.pushKV("connected_proof_count", connectedProofCount); | ||||
network.pushKV("dangling_proof_count", | |||||
proofCount - connectedProofCount); | |||||
network.pushKV("finalized_proof_count", finalizedProofCount); | network.pushKV("finalized_proof_count", finalizedProofCount); | ||||
network.pushKV("conflicting_proof_count", | network.pushKV("conflicting_proof_count", | ||||
uint64_t(pm.getConflictingProofCount())); | uint64_t(pm.getConflictingProofCount())); | ||||
network.pushKV("orphan_proof_count", | network.pushKV("orphan_proof_count", | ||||
uint64_t(pm.getOrphanProofCount())); | uint64_t(pm.getOrphanProofCount())); | ||||
network.pushKV("total_stake_amount", totalStakes); | network.pushKV("total_stake_amount", totalStakes); | ||||
network.pushKV("connected_stake_amount", connectedStakes); | network.pushKV("connected_stake_amount", connectedStakes); | ||||
network.pushKV("dangling_stake_amount", | |||||
totalStakes - connectedStakes); | |||||
const uint64_t connectedNodes = pm.getNodeCount(); | const uint64_t connectedNodes = pm.getNodeCount(); | ||||
const uint64_t pendingNodes = pm.getPendingNodeCount(); | const uint64_t pendingNodes = pm.getPendingNodeCount(); | ||||
network.pushKV("node_count", connectedNodes + pendingNodes); | network.pushKV("node_count", connectedNodes + pendingNodes); | ||||
network.pushKV("connected_node_count", connectedNodes); | network.pushKV("connected_node_count", connectedNodes); | ||||
network.pushKV("pending_node_count", pendingNodes); | network.pushKV("pending_node_count", pendingNodes); | ||||
ret.pushKV("network", network); | ret.pushKV("network", network); | ||||
▲ Show 20 Lines • Show All 285 Lines • Show Last 20 Lines |