use of org.aion.zero.impl.valid.UnityDifficultyRule in project aion by aionnetwork.
the class ChainConfiguration method createUnityGreatGrandParentHeaderValidator.
public GreatGrandParentBlockHeaderValidator createUnityGreatGrandParentHeaderValidator() {
List<GreatGrandParentDependantBlockHeaderRule> powRules = Collections.singletonList(new UnityDifficultyRule(this));
List<GreatGrandParentDependantBlockHeaderRule> posRules = Arrays.asList(new UnityDifficultyRule(this), new StakingSeedRule());
Map<Seal, List<GreatGrandParentDependantBlockHeaderRule>> unityRules = new EnumMap<>(Seal.class);
unityRules.put(Seal.PROOF_OF_WORK, powRules);
unityRules.put(Seal.PROOF_OF_STAKE, posRules);
return new GreatGrandParentBlockHeaderValidator(unityRules);
}
use of org.aion.zero.impl.valid.UnityDifficultyRule in project aion by aionnetwork.
the class ChainConfiguration method createNonceSeedDifficultyValidator.
public GreatGrandParentBlockHeaderValidator createNonceSeedDifficultyValidator() {
List<GreatGrandParentDependantBlockHeaderRule> posRules = Collections.singletonList(new UnityDifficultyRule(this));
Map<Seal, List<GreatGrandParentDependantBlockHeaderRule>> unityRules = new EnumMap<>(Seal.class);
unityRules.put(Seal.PROOF_OF_STAKE, posRules);
return new GreatGrandParentBlockHeaderValidator(unityRules);
}
Aggregations