Show / Hide Table of Contents

Class BlockCommit

Inheritance
System.Object
BlockCommit
Implements
IBencodable
Namespace: Libplanet.Types.Blocks
Assembly: Libplanet.Types.dll
Syntax
public sealed class BlockCommit : IEquatable<BlockCommit>

Constructors

| Improve this Doc View Source

BlockCommit(Bencodex.Types.IValue)

Declaration
public BlockCommit(Bencodex.Types.IValue bencoded)
Parameters
Type Name Description
Bencodex.Types.IValue bencoded
| Improve this Doc View Source

BlockCommit(Int64, Int32, BlockHash, ImmutableArray<Vote>)

Creates an instance of BlockCommit given a set of Votes.

Declaration
public BlockCommit(long height, int round, BlockHash blockHash, ImmutableArray<Vote> votes)
Parameters
Type Name Description
System.Int64 height

The Index of the last committed Block.

System.Int32 round

The round in which a consensus was reached.

BlockHash blockHash

The Hash of the last committed Block.

ImmutableArray<Vote> votes

The set of Votes as a proof for the commit of the last Block.

Properties

| Improve this Doc View Source

Bencoded

Declaration
public Bencodex.Types.IValue Bencoded { get; }
Property Value
Type Description
Bencodex.Types.IValue
| Improve this Doc View Source

BlockHash

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

Height

Declaration
public long Height { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

Round

Declaration
public int Round { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Votes

Declaration
public ImmutableArray<Vote> Votes { get; }
Property Value
Type Description
ImmutableArray<Vote>

Methods

| Improve this Doc View Source

Equals(BlockCommit)

Declaration
public bool Equals(BlockCommit other)
Parameters
Type Name Description
BlockCommit other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Nullable<Object>)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
| Improve this Doc View Source

ToHash()

Gets a digested BlockCommit hash value.

Declaration
public HashDigest<SHA256> ToHash()
Returns
Type Description
HashDigest<SHA256>

Returns a digested BlockCommit.

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Implements

IBencodable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2023 Planetarium