diff --git a/src/main/java/com/semuxpool/pool/PoolRunner.java b/src/main/java/com/semuxpool/pool/PoolRunner.java index 9ed05b2..dfa69d5 100644 --- a/src/main/java/com/semuxpool/pool/PoolRunner.java +++ b/src/main/java/com/semuxpool/pool/PoolRunner.java @@ -59,11 +59,8 @@ public static void main(String[] args) throws IOException, SemuxException poolAddresses.add(payQuitterAddress); Integer minimumVoteAgeBeforeCounting = Integer.valueOf(properties.getProperty("minimumVoteAgeBeforeCounting", "200")); - - PoolProfitAddresses poolProfitsAddress = PoolProfitAddresses.fromString(properties.getProperty("poolProfitsAddress")); - poolAddresses.addAll(poolProfitsAddress.getAddresses()); boolean submitToAggregationSite = Boolean.valueOf(properties.getProperty("submitToAggregationSite", "false")); long startBlock = Long.valueOf(properties.getProperty("startProcessingAtBlock", "0")); diff --git a/src/main/java/com/semuxpool/pool/api/BlockResult.java b/src/main/java/com/semuxpool/pool/api/BlockResult.java index 08913fd..1fa6d5a 100644 --- a/src/main/java/com/semuxpool/pool/api/BlockResult.java +++ b/src/main/java/com/semuxpool/pool/api/BlockResult.java @@ -66,6 +66,10 @@ public Map getPayouts() */ private Long getPartialReward(Long value) { + if(totalVotes == 0) + { + return 0l; + } BigInteger results = BigInteger.valueOf(getBlockReward()).multiply(BigInteger.valueOf(value)).divide(BigInteger.valueOf(totalVotes)); return results.longValue(); } diff --git a/src/main/java/com/semuxpool/pool/block/BlockResultFactory.java b/src/main/java/com/semuxpool/pool/block/BlockResultFactory.java index 20d4101..738586a 100644 --- a/src/main/java/com/semuxpool/pool/block/BlockResultFactory.java +++ b/src/main/java/com/semuxpool/pool/block/BlockResultFactory.java @@ -169,7 +169,7 @@ else if (transaction.getType().equals("UNVOTE")) currentVal = currentVal + valueToAdd; if (currentVal < 0L) { - logger.info("Negative vote amount from " + transaction.getFrom()); + logger.info("Negative vote amount from " + transaction.getFrom() + ", votes = " + currentVal + ". This is normal when votes not yet vested are unvoted."); currentVal = 0l; }