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