Function ValidatorSet.hasPublicKey

Check with public key if an enrollment data exists in the validator set

bool hasPublicKey (
  in const(Height) height,
  in ref const(PublicKey) pubkey
) nothrow @trusted;

Parameters

NameDescription
height block height for enrollment which includes the actual block with the enrollment as we are checking if public key is already used
pubkey the key by which the validator set searches enrollment

Returns

true if the validator set has an enrollment for the public key