Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/avalanche.cpp
Show First 20 Lines • Show All 667 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
{RPCResult::Type::NUM, "proof_count", | {RPCResult::Type::NUM, "proof_count", | ||||
"The number of valid avalanche proofs we know exist."}, | "The number of valid avalanche proofs we know exist."}, | ||||
{RPCResult::Type::NUM, "connected_proof_count", | {RPCResult::Type::NUM, "connected_proof_count", | ||||
"The number of avalanche proofs with at least one node " | "The number of avalanche proofs with at least one node " | ||||
"we are connected to."}, | "we are connected to."}, | ||||
{RPCResult::Type::NUM, "conflicting_proof_count", | {RPCResult::Type::NUM, "conflicting_proof_count", | ||||
"The number of known avalanche proofs that conflict with " | "The number of known avalanche proofs that conflict with " | ||||
"valid proofs."}, | "valid proofs."}, | ||||
{RPCResult::Type::NUM, "orphan_proof_count", | |||||
"The number of known avalanche proofs that are " | |||||
"orphaned."}, | |||||
{RPCResult::Type::STR_AMOUNT, "total_stake_amount", | {RPCResult::Type::STR_AMOUNT, "total_stake_amount", | ||||
"The total staked amount over all the valid proofs in " + | "The total staked amount over all the valid proofs in " + | ||||
Currency::get().ticker + "."}, | Currency::get().ticker + "."}, | ||||
{RPCResult::Type::STR_AMOUNT, "connected_stake_amount", | {RPCResult::Type::STR_AMOUNT, "connected_stake_amount", | ||||
"The total staked amount over all the connected proofs " | "The total staked amount over all the connected proofs " | ||||
"in " + | "in " + | ||||
Currency::get().ticker + "."}, | Currency::get().ticker + "."}, | ||||
{RPCResult::Type::NUM, "node_count", | {RPCResult::Type::NUM, "node_count", | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | return RPCHelpMan{ | ||||
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("conflicting_proof_count", | network.pushKV("conflicting_proof_count", | ||||
pm.getConflictingProofCount()); | pm.getConflictingProofCount()); | ||||
network.pushKV("orphan_proof_count", 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); | ||||
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); | ||||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |