Skip to content

Commit

Permalink
Fix validator info stake balance bug
Browse files Browse the repository at this point in the history
  • Loading branch information
platfowner committed Feb 8, 2024
1 parent f6ade8c commit 8a415da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion json_rpc/consensus.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ module.exports = function getConsensusApis(node) {
const beginTime = Date.now();
const addr = args.address;
const isWhitelisted = node.db.getValue(PathUtil.getConsensusProposerWhitelistAddrPath(addr)) || false;
const stake = node.db.getValue(PathUtil.getServiceAccountBalancePath(addr)) || 0;
const stake = node.db.getValue(PathUtil.getConsensusStakingAccountBalancePath(addr)) || 0;
const latency = Date.now() - beginTime;
trafficStatsManager.addEvent(TrafficEventTypes.JSON_RPC_GET, latency);
done(null, JsonRpcUtil.addProtocolVersion({
result: {
address: addr,
isWhitelisted,
stake,
}
Expand Down

0 comments on commit 8a415da

Please sign in to comment.