Skip to content

nooschain v0.1.0


nooschain / protocol/protocol-registry / getProtocolVersionForHeight

Function: getProtocolVersionForHeight()

getProtocolVersionForHeight(database, height): Promise<number>

Defined in: protocol/protocol-registry.ts:44

Resolves the active protocol version for a concrete block height.

The highest active protocol-upgrade row whose activation height is less than or equal to the target height wins. If no upgrade row exists, the latest version supported by the binary is used as the default.

Parameters

database

ProtocolDatabase

height

string | number | bigint

Returns

Promise<number>

Audience-first NOOSChain documentation.