-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1068 from limebell/refactor/block-demand
Introduce BlockDemand in Swarm
- Loading branch information
Showing
4 changed files
with
45 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#nullable enable | ||
using Libplanet.Blocks; | ||
|
||
namespace Libplanet.Net | ||
{ | ||
/// <summary> | ||
/// Struct represents <see cref="Swarm{T}"/>'s block demand status. | ||
/// </summary> | ||
public readonly struct BlockDemand | ||
{ | ||
/// <summary> | ||
/// The <see cref="BlockHeader"/> of the block to request. | ||
/// </summary> | ||
public readonly BlockHeader Header; | ||
|
||
/// <summary> | ||
/// The <see cref="BoundPeer"/> to request block hash from. | ||
/// </summary> | ||
public readonly BoundPeer Peer; | ||
|
||
public BlockDemand(BlockHeader header, BoundPeer peer) | ||
{ | ||
Header = header; | ||
Peer = peer; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters