Show / Hide Table of Contents

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 Source

BlockDigest(Bencodex.Types.Dictionary)

Creates BlockDigest instance from representation of the Block<T>.

Declaration
public BlockDigest(Bencodex.Types.Dictionary dict)
Parameters
Type Name Description
Bencodex.Types.Dictionary dict

representation of the Block<T>.

| Improve this Doc View Source

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 Source

Header

Declaration
public BlockHeader Header { get; }
Property Value
Type Description
BlockHeader
| Improve this Doc View Source

TxIds

Declaration
public ImmutableArray<ImmutableArray<byte>> TxIds { get; }
Property Value
Type Description
ImmutableArray<ImmutableArray<Byte>>

Methods

| Improve this Doc View Source

Deserialize(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.

| Improve this Doc View Source

Serialize()

Gets serialized byte array of the BlockDigest.

Declaration
public byte[] Serialize()
Returns
Type Description
Byte[]

Serialized byte array of BlockDigest.

| Improve this Doc View Source

ToBencodex()

Gets representation of BlockDigest.

Declaration
public Bencodex.Types.Dictionary ToBencodex()
Returns
Type Description
Bencodex.Types.Dictionary

representation of BlockDigest.

  • Improve this Doc
  • View Source
Back to top Copyright © 2019–2020 Planetarium