Search in sources :

Example 1 with AionDifficultyRule

use of org.aion.zero.impl.valid.AionDifficultyRule in project aion by aionnetwork.

the class ChainConfiguration method createPreUnityGrandParentHeaderValidator.

public GrandParentBlockHeaderValidator createPreUnityGrandParentHeaderValidator() {
    List<GrandParentDependantBlockHeaderRule> powRules = Collections.singletonList(new AionDifficultyRule(this));
    Map<Seal, List<GrandParentDependantBlockHeaderRule>> unityRules = new EnumMap<>(Seal.class);
    unityRules.put(Seal.PROOF_OF_WORK, powRules);
    return new GrandParentBlockHeaderValidator(unityRules);
}
Also used : GreatGrandParentDependantBlockHeaderRule(org.aion.zero.impl.valid.GreatGrandParentDependantBlockHeaderRule) GrandParentDependantBlockHeaderRule(org.aion.zero.impl.valid.GrandParentDependantBlockHeaderRule) AionDifficultyRule(org.aion.zero.impl.valid.AionDifficultyRule) Seal(org.aion.zero.impl.types.BlockHeader.Seal) List(java.util.List) GreatGrandParentBlockHeaderValidator(org.aion.zero.impl.valid.GreatGrandParentBlockHeaderValidator) GrandParentBlockHeaderValidator(org.aion.zero.impl.valid.GrandParentBlockHeaderValidator) EnumMap(java.util.EnumMap)

Aggregations

EnumMap (java.util.EnumMap)1 List (java.util.List)1 Seal (org.aion.zero.impl.types.BlockHeader.Seal)1 AionDifficultyRule (org.aion.zero.impl.valid.AionDifficultyRule)1 GrandParentBlockHeaderValidator (org.aion.zero.impl.valid.GrandParentBlockHeaderValidator)1 GrandParentDependantBlockHeaderRule (org.aion.zero.impl.valid.GrandParentDependantBlockHeaderRule)1 GreatGrandParentBlockHeaderValidator (org.aion.zero.impl.valid.GreatGrandParentBlockHeaderValidator)1 GreatGrandParentDependantBlockHeaderRule (org.aion.zero.impl.valid.GreatGrandParentDependantBlockHeaderRule)1