update 聊天室遗漏队列添加,dgb系列幸运值全网报块数问题
This commit is contained in:
@@ -98,14 +98,8 @@ public class PoolServiceImpl implements PoolService {
|
||||
|
||||
dto.setTotalDifficulty(PowerUnitUtils.difficultyFormat(info.getDifficulty()));
|
||||
|
||||
BigDecimal netPower;
|
||||
if(pool.getBlockTime() != 0){
|
||||
netPower = BigDecimal.valueOf(info.getDifficulty().longValue() * 2 ^ 32 / pool.getBlockTime());
|
||||
}else{
|
||||
netPower = info.getPower();
|
||||
}
|
||||
//全网算力 调用转换工具 动态转换为数值+单位
|
||||
dto.setTotalPower(PowerUnitUtils.powerFormat(netPower,pool.getCoin()));
|
||||
dto.setTotalPower(PowerUnitUtils.powerFormat(info.getPower(),pool.getCoin()));
|
||||
//System.out.println("dto"+dto);
|
||||
}else {
|
||||
System.out.println("未能从节点获取到信息");
|
||||
@@ -113,6 +107,7 @@ public class PoolServiceImpl implements PoolService {
|
||||
|
||||
BigDecimal price = redisService.getCacheObject(pool.getCoin() + "_price");
|
||||
dto.setPrice(price.toEngineeringString()+ " USD");
|
||||
dto.setHeight(info.getHeight());
|
||||
}
|
||||
|
||||
//从enums中拿币种名、页面显示名、币种对应算法
|
||||
@@ -120,6 +115,7 @@ public class PoolServiceImpl implements PoolService {
|
||||
dto.setName(pool.getName());
|
||||
dto.setAlgorithm(pool.getAlgorithm());
|
||||
|
||||
|
||||
//从池子算力统计表pool_stats拿对应矿池算力 30m
|
||||
//从实时表拿24h
|
||||
double mhs = Convert.toDouble(poolMapper.getNowPoolDailyPower(pool.getMhs()+"_realv2"),0.0) * pool.getFac();
|
||||
|
||||
@@ -30,7 +30,6 @@ public class NodeRpc{
|
||||
public static String getResult(String coin,String method,String[] params) {
|
||||
|
||||
NodeConfig config = (NodeConfig) EnumUtils.get(NodeConfig.class, coin);
|
||||
System.out.println("----------执行rpc接口调用");
|
||||
String uri ="http://"+config.getIp()+":"+config.getHost();
|
||||
|
||||
String auth =config.getUser()+":"+config.getPwd();
|
||||
|
||||
Reference in New Issue
Block a user