public static ConstructGetBlocksPayload ( ImmutableArray |
||
blockLocatorHashes | ImmutableArray |
|
hashStop | UInt256 | |
return | BitSharp.Network.GetBlocksPayload |
public static GetBlocksPayload ConstructGetBlocksPayload(ImmutableArray<UInt256> blockLocatorHashes, UInt256 hashStop)
{
return new GetBlocksPayload
(
Version: PROTOCOL_VERSION,
BlockLocatorHashes: blockLocatorHashes,
HashStop: hashStop
);
}
}
public async Task SendGetBlocks(ImmutableArray <UInt256> blockLocatorHashes, UInt256 hashStop) { var getBlocksPayload = Messaging.ConstructGetBlocksPayload(blockLocatorHashes, hashStop); var getBlocksMessage = Messaging.ConstructMessage("getblocks", NetworkEncoder.EncodeGetBlocksPayload(getBlocksPayload)); await SendMessageAsync(getBlocksMessage); }