Show / Hide Table of Contents

Class RemoveConsensusNodeExtensions

Extension methods for removing consensus nodes from the network address book.

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

Methods

| Edit this page View Source

RemoveConsensusNodeAsync(ConsensusClient, RemoveConsensusNodeParams, Action<IConsensusContext>?)

Removes a consensus node from the network address book.

Declaration
public static Task<TransactionReceipt> RemoveConsensusNodeAsync(this ConsensusClient client, RemoveConsensusNodeParams deleteParams, Action<IConsensusContext>? configure = null)
Parameters
Type Name Description
ConsensusClient client

The Consensus Node Client orchestrating the request.

RemoveConsensusNodeParams deleteParams

The deletion parameters containing the node identifier to delete.

Action<IConsensusContext> configure

Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network.

Returns
Type Description
Task<TransactionReceipt>

A transaction receipt indicating a successful operation.

Examples
// Remove a node from the address book. Effective at the next network
// stake-weight rebalance. The node's AdminKey must sign.
var receipt = await client.RemoveConsensusNodeAsync(nodeId);
Console.WriteLine($"Remove status: {receipt.Status}");
Exceptions
Type Condition
ArgumentOutOfRangeException

If required arguments are missing.

InvalidOperationException

If required context configuration is missing.

PrecheckException

If the gateway node rejected the request upon submission.

ConsensusException

If the network was unable to come to consensus before the duration of the transaction expired.

TransactionException

If the network rejected the request as invalid or had missing data.

| Edit this page View Source

RemoveConsensusNodeAsync(ConsensusClient, ulong, Action<IConsensusContext>?)

Removes a consensus node from the network address book.

Declaration
public static Task<TransactionReceipt> RemoveConsensusNodeAsync(this ConsensusClient client, ulong nodeId, Action<IConsensusContext>? configure = null)
Parameters
Type Name Description
ConsensusClient client

The Consensus Node Client orchestrating the request.

ulong nodeId

The identifier of the node to delete.

Action<IConsensusContext> configure

Optional callback method providing an opportunity to modify the execution configuration for just this method call. It is executed prior to submitting the request to the network.

Returns
Type Description
Task<TransactionReceipt>

A transaction receipt indicating a successful operation.

Remarks

This is a privileged transaction requiring Hedera governing council authorization. The node is fully removed from the network at the next upgrade.

Examples
// Remove a node from the address book. Effective at the next network
// stake-weight rebalance. The node's AdminKey must sign.
var receipt = await client.RemoveConsensusNodeAsync(nodeId);
Console.WriteLine($"Remove status: {receipt.Status}");
Exceptions
Type Condition
ArgumentOutOfRangeException

If required arguments are missing.

InvalidOperationException

If required context configuration is missing.

PrecheckException

If the gateway node rejected the request upon submission.

ConsensusException

If the network was unable to come to consensus before the duration of the transaction expired.

TransactionException

If the network rejected the request as invalid or had missing data.

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