MCPcopy Create free account
hub / github.com/subquery/subql / assertChainId

Method assertChainId

packages/node/src/indexer/api.service.ts:402–413  ·  view source on GitHub ↗
(
    network: { chainId: string },
    connection: ApiPromiseConnection,
  )

Source from the content-addressed store, hash-verified

400
401 // Polkadot uses genesis hash instead of chainId
402 protected assertChainId(
403 network: { chainId: string },
404 connection: ApiPromiseConnection,
405 ): void {
406 if (network.chainId !== connection.networkMeta.genesisHash) {
407 throw new MetadataMismatchError(
408 'ChainId',
409 network.chainId,
410 connection.networkMeta.genesisHash,
411 );
412 }
413 }
414}

Callers 1

performConnectionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected