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
Namespace: Libplanet.Blockchain
Assembly: Libplanet.dll
Syntax
public struct BlockPerception
Constructors
| Improve this Doc View SourceBlockPerception(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. |
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
|
Properties
| Improve this Doc View SourceBlockExcerpt
The block perceived by the local node.
Declaration
public IBlockExcerpt BlockExcerpt { get; }
Property Value
Type | Description |
---|---|
IBlockExcerpt |
PerceivedTime
The time the local node perceived the BlockExcerpt.
Declaration
public DateTimeOffset PerceivedTime { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |