Search in sources :

Example 1 with StakingSeedCreationRule

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

the class ChainConfiguration method createNonceSeedValidator.

public GreatGrandParentBlockHeaderValidator createNonceSeedValidator() {
    List<GreatGrandParentDependantBlockHeaderRule> posRules = Collections.singletonList(new StakingSeedCreationRule());
    Map<Seal, List<GreatGrandParentDependantBlockHeaderRule>> unityRules = new EnumMap<>(Seal.class);
    unityRules.put(Seal.PROOF_OF_STAKE, posRules);
    return new GreatGrandParentBlockHeaderValidator(unityRules);
}
Also used : GreatGrandParentDependantBlockHeaderRule(org.aion.zero.impl.valid.GreatGrandParentDependantBlockHeaderRule) GreatGrandParentBlockHeaderValidator(org.aion.zero.impl.valid.GreatGrandParentBlockHeaderValidator) Seal(org.aion.zero.impl.types.BlockHeader.Seal) List(java.util.List) StakingSeedCreationRule(org.aion.zero.impl.valid.StakingSeedCreationRule) EnumMap(java.util.EnumMap)

Aggregations

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