Skip to main content

ProtocolConfigs

ProtocolConfigs​

struct ProtocolConfigs

Information about the configuration of the protocol. Constants that control how the chain operates. These can only change during protocol upgrades which happen on epoch boundaries.

init(protocolVersion:featureFlags:configs:)​

init(protocolVersion: UInt64, featureFlags: [ProtocolConfigFeatureFlag], configs: [ProtocolConfigAttr])

configs​

var configs: [ProtocolConfigAttr]

List all available configurations and their values. These configurations can take any value (but they will all be represented in string form), and do not include feature flags.

featureFlags​

var featureFlags: [ProtocolConfigFeatureFlag]

List all available feature flags and their values. Feature flags are a form of boolean configuration that are usually used to gate features while they are in development. Once a flag has been enabled, it is rare for it to be disabled.

protocolVersion​

var protocolVersion: UInt64

The protocol is not required to change on every epoch boundary, so the protocol version tracks which change to the protocol these configs are from.

!=(_:_:)​

static func != (lhs: Self, rhs: Self) -> Bool

Returns a Boolean value indicating whether two values are not equal.

Inequality is the inverse of equality. For any values a and b, a != b implies that a == b is false.

This is the default implementation of the not-equal-to operator (!=) for any type that conforms to Equatable.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.