Search in sources :

Example 1 with VRFProofRule

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

the class ChainConfiguration method createVRFValidator.

public GrandParentBlockHeaderValidator createVRFValidator() {
    List<GrandParentDependantBlockHeaderRule> posRules = Collections.singletonList(new VRFProofRule());
    Map<Seal, List<GrandParentDependantBlockHeaderRule>> vrfProofRules = new EnumMap<>(Seal.class);
    vrfProofRules.put(Seal.PROOF_OF_STAKE, posRules);
    return new GrandParentBlockHeaderValidator(vrfProofRules);
}
Also used : GreatGrandParentDependantBlockHeaderRule(org.aion.zero.impl.valid.GreatGrandParentDependantBlockHeaderRule) GrandParentDependantBlockHeaderRule(org.aion.zero.impl.valid.GrandParentDependantBlockHeaderRule) VRFProofRule(org.aion.zero.impl.valid.VRFProofRule) 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 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 VRFProofRule (org.aion.zero.impl.valid.VRFProofRule)1