MsgGetHeaders constructor

MsgGetHeaders({
  1. required int protocolVersion,
  2. required List<Hash> blockLocatorHashes,
  3. required Hash hashStop,
})

Creates a new MsgGetHeaders message.

Implementation

MsgGetHeaders({
  required this.protocolVersion,
  required this.blockLocatorHashes,
  required this.hashStop,
}) {
  if (blockLocatorHashes.length > maxBlockLocatorsPerMsg) {
    throw WireException('getheaders',
        'Too many block locator hashes: ${blockLocatorHashes.length}, max: $maxBlockLocatorsPerMsg');
  }
}