Show / Hide Table of Contents

Class ConsensusNodeDataExtensions

Extension methods for querying consensus node data from the mirror node.

Inheritance
object
ConsensusNodeDataExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.Mirror
Assembly: Hiero.dll
Syntax
public static class ConsensusNodeDataExtensions

Methods

| Edit this page View Source

GetActiveConsensusNodesAsync(MirrorRestClient, int)

Retrieves a list of Hedera gRPC nodes known to the mirror node that respond to a ping query within the given timeout value. This can be used to create a list of working gRPC nodes for submitting transactions.

Declaration
public static Task<IReadOnlyDictionary<ConsensusNodeEndpoint, long>> GetActiveConsensusNodesAsync(this MirrorRestClient client, int maxTimeoutInMilliseconds)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

int maxTimeoutInMilliseconds

The time value threshold, that if exceeded, will result in the node not being considered active and included on this list.

Returns
Type Description
Task<IReadOnlyDictionary<ConsensusNodeEndpoint, long>>

A dictionary of gateways and the corresponding response time (in milliseconds).

| Edit this page View Source

GetConsensusNodesAsync(MirrorRestClient)

Retrieves the list of known Hedera Gossip Nodes.

Declaration
public static IAsyncEnumerable<ConsensusNodeData> GetConsensusNodesAsync(this MirrorRestClient client)
Parameters
Type Name Description
MirrorRestClient client

Mirror Rest Client to use for the request.

Returns
Type Description
IAsyncEnumerable<ConsensusNodeData>

The list of known Hedera Gossip Nodes.

  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph