addBlockLocatorHash method

void addBlockLocatorHash(
  1. Hash hash
)

Adds a new block locator hash to the message.

Implementation

void addBlockLocatorHash(Hash hash) {
  if (blockLocatorHashes.length + 1 > maxBlockLocatorsPerMsg) {
    throw WireException('getheaders',
        'Too many block locator hashes for message: max $maxBlockLocatorsPerMsg');
  }
  blockLocatorHashes.add(hash);
}