Class ConsensusNodeRecord
The consensus record from a successful Create Node transaction, containing the newly assigned node identifier.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record ConsensusNodeRecord : TransactionRecord, IEquatable<TransactionReceipt>, IEquatable<TransactionRecord>, IEquatable<ConsensusNodeRecord>
Remarks
Best-effort when inferred, exactly as for ConsensusNodeReceipt: the node whose identifier is 0 cannot be recognised as a node creation. Records obtained from GetTransactionRecordAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?), GetAllTransactionRecordsAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?) or GetAccountRecordsAsync(ConsensusClient, EntityId, CancellationToken, Action<IConsensusContext>?) therefore arrive as a plain TransactionRecord in that case. No value is lost — the substitution happens only when the value is zero. Test rather than cast:
ulong nodeId = record is ConsensusNodeRecord node ? node.NodeId : 0;
Properties
| Edit this page View SourceNodeId
The identifier assigned to the newly created consensus node. This value is unique within the network and will not be reused even if the node is later deleted.
Declaration
public ulong NodeId { get; }
Property Value
| Type | Description |
|---|---|
| ulong |