Translations:Forging Algorithm/14/en
From ArdorDocs
The block forger
The way who gets to generate the next block is chosen, is done by using the condition:
if (hits.get(accountId).compareTo(target) < 0){
BlockchainProcessorImpl.getInstance().generateBlock(secretPhrase);
}
Taken from ardor / src / java / nxt / Generator.java