Show / Hide Table of Contents

Struct BlockPerception

Pair of a block and the time the local node perceived it.

Purposes to be compared when the canonical chain is determined.

Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: Libplanet.Blockchain
Assembly: Libplanet.dll
Syntax
public struct BlockPerception

Constructors

| Improve this Doc View Source

BlockPerception(IBlockExcerpt)

Creates a pair with setting PerceivedTime to the current time.

Declaration
public BlockPerception(IBlockExcerpt blockExcerpt)
Parameters
Type Name Description
IBlockExcerpt blockExcerpt

The block perceived by the local node.

| Improve this Doc View Source

BlockPerception(IBlockExcerpt, DateTimeOffset)

Creates a pair.

Declaration
public BlockPerception(IBlockExcerpt blockExcerpt, DateTimeOffset perceivedTime)
Parameters
Type Name Description
IBlockExcerpt blockExcerpt

The block perceived by the local node.

DateTimeOffset perceivedTime

The time the local node perceived the blockExcerpt.

Properties

| Improve this Doc View Source

BlockExcerpt

The block perceived by the local node.

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

PerceivedTime

The time the local node perceived the BlockExcerpt.

Declaration
public DateTimeOffset PerceivedTime { get; }
Property Value
Type Description
DateTimeOffset

Methods

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
ValueType.ToString()
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium