GetNetworkForMagic

Determines which chain a set of network magic bytes belongs to.

Synopsis

Declared in <kernel/chainparams.h>

std::optional<ChainType>
GetNetworkForMagic(MessageStartChars const& pchMessageStart);

Return Value

The matching chain type, or an empty optional if unrecognized.

Parameters

NameDescription
pchMessageStartThe message-start bytes to identify.