use of io.nuls.rpc.resources.dto.WholeNetConsensusInfoDTO in project nuls by nuls-io.
the class PocConsensusResource method getWholeInfo.
@GET
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the whole network consensus infomation!")
public RpcResult getWholeInfo() {
RpcResult result = RpcResult.getSuccess();
WholeNetConsensusInfoDTO dto = new WholeNetConsensusInfoDTO();
Map<String, Object> map = this.consensusService.getConsensusInfo();
dto.setAgentCount((Integer) map.get("agentCount"));
dto.setRewardOfDay((Long) map.get("rewardOfDay"));
dto.setTotalDeposit((Long) map.get("totalDeposit"));
dto.setConsensusAccountNumber((Integer) map.get("memberCount"));
result.setData(dto);
return result;
}
Aggregations