Show / Hide Table of Contents

Block Class

The class that represents blocks, providing a set of related properties.

Namespace: Neo.SmartContract.Framework.Services

Assembly: Neo.SmartContract.Framework

Syntax

public class Block

Attributes

NameDescription
HashGets the block hash
VersionGets the block version number
PrevHashGets the hash of the previous block
MerkleRootGets the Merkle root of the block
TimestampGet the time stamp of the block
IndexGets the block index which is counted from 0
Index = Height = Count - 1
PrimaryIndexThe primary(speaker) index of the consensus node that generated this block
NextConsensusGet the consensus contract for the next block, i.e. multi-party signed contract composed of more than 2/3 consensus nodes)
TransactionsCountGets the transaction number of the block

Constructor

The Block object can be constructed through Ledger.GetBlock() .