Show / Hide Table of Contents

Blockchain.GetValidators Method ()

Returns the public keys of the validators (consensus nodes).

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public static extern byte[][] GetValidators()

Return Value: A public key array, each element being a byte array of length 33.

Example

public class Contract1: SmartContract
{
     public static void Main()
     {
         byte[][] validators = Blockchain.GetValidators();
     }
}

Back