Struct BlockDigest
Class that store uses to save blocks. This contains: BlockHeader, and list of TxIds.
Namespace: Libplanet.Blocks
Assembly: Libplanet.dll
Syntax
public struct BlockDigest
Constructors
| Improve this Doc View SourceBlockDigest(Bencodex.Types.Dictionary)
Creates BlockDigest instance from
Declaration
public BlockDigest(Bencodex.Types.Dictionary dict)
Parameters
| Type | Name | Description |
|---|---|---|
| Bencodex.Types.Dictionary | dict |
BlockDigest(BlockHeader, ImmutableArray<ImmutableArray<Byte>>)
Creates BlockDigest instance from BlockHeader and Transaction<T> ids the Block<T> has.
Declaration
public BlockDigest(BlockHeader header, ImmutableArray<ImmutableArray<byte>> txIds)
Parameters
| Type | Name | Description |
|---|---|---|
| BlockHeader | header | BlockHeader of the Block<T>. |
| ImmutableArray<ImmutableArray<Byte>> | txIds | Transaction<T> ids the Block<T> has. |
Properties
| Improve this Doc View SourceHeader
Declaration
public BlockHeader Header { get; }
Property Value
| Type | Description |
|---|---|
| BlockHeader |
TxIds
Declaration
public ImmutableArray<ImmutableArray<byte>> TxIds { get; }
Property Value
| Type | Description |
|---|---|
| ImmutableArray<ImmutableArray<Byte>> |
Methods
| Improve this Doc View SourceDeserialize(Byte[])
Gets BlockDigest instance from serialized bytes.
Declaration
public static BlockDigest Deserialize(byte[] bytes)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | bytes | Serialized BlockDigest. |
Returns
| Type | Description |
|---|---|
| BlockDigest | Deserialized BlockDigest. |
Serialize()
Gets serialized byte array of the BlockDigest.
Declaration
public byte[] Serialize()
Returns
| Type | Description |
|---|---|
| Byte[] | Serialized byte array of BlockDigest. |
ToBencodex()
Gets
Declaration
public Bencodex.Types.Dictionary ToBencodex()
Returns
| Type | Description |
|---|---|
| Bencodex.Types.Dictionary |