Skip to content

Commit

Permalink
Increase MinerServer cache size to 20 and do not remove found solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
aeidelman committed May 18, 2017
1 parent 08bb57f commit 98b8741
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Empty file modified configure.sh
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions rskj-core/src/main/java/co/rsk/mine/MinerServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class MinerServerImpl implements MinerServer {

private static final Logger logger = LoggerFactory.getLogger("minerserver");

private static final int CACHE_SIZE = 10;
private static final int CACHE_SIZE = 20;

@GuardedBy("LOCK")
private LinkedHashMap<Sha3Hash, Block> blocksWaitingforPoW;
Expand Down Expand Up @@ -174,7 +174,6 @@ public void submitBitcoinBlock(String blockHashForMergedMining, co.rsk.bitcoinj.
if (!isValid(newBlock)) {
logger.error("Invalid block supplied by miner " + " : " + newBlock.getShortHash() + " " + newBlock.getShortHashForMergedMining() + " at height " + newBlock.getNumber() + ". Hash: " + newBlock.getShortHash());
} else {
blocksWaitingforPoW.remove(key);
ImportResult importResult = ethereum.addNewMinedBlock(newBlock);
logger.info("Mined block import result is " + importResult + " : " + newBlock.getShortHash() + " " + newBlock.getShortHashForMergedMining() + " at height " + newBlock.getNumber() + ". Hash: " + newBlock.getShortHash());
}
Expand Down

0 comments on commit 98b8741

Please sign in to comment.