Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
using System.Numerics; |
|
2 |
|
|
3 |
namespace Libplanet.Net |
|
4 |
{
|
|
5 |
/// <summary>
|
|
6 |
/// The blockchain state of <see cref="BoundPeer"/>.
|
|
7 |
/// </summary>
|
|
8 |
public readonly struct PeerChainState |
|
9 |
{
|
|
10 |
public PeerChainState(BoundPeer peer, long tipIndex, BigInteger totalDifficulty) |
|
11 | 1 |
{
|
12 | 1 |
Peer = peer; |
13 | 1 |
TipIndex = tipIndex; |
14 | 1 |
TotalDifficulty = totalDifficulty; |
15 | 1 |
}
|
16 |
|
|
17 |
/// <summary>
|
|
18 |
/// The peer with chain.
|
|
19 |
/// </summary>
|
|
20 |
public BoundPeer Peer { get; } |
|
21 |
|
|
22 |
/// <summary>
|
|
23 |
/// The blockchain tip of the <see cref="Peer"/>.
|
|
24 |
/// </summary>
|
|
25 |
public long TipIndex { get; } |
|
26 |
|
|
27 |
/// <summary>
|
|
28 |
/// The total difficulty of the blockchain of the <see cref="Peer"/>.
|
|
29 |
/// </summary>
|
|
30 |
public BigInteger TotalDifficulty { get; } |
|
31 |
|
|
32 |
/// <inheritdoc />
|
|
33 |
public override string ToString() |
|
34 |
{
|
|
35 |
return $"{Peer}, {TipIndex}, {TotalDifficulty}"; |
|
36 |
}
|
|
37 |
}
|
|
38 |
}
|
Read our documentation on viewing source code .