[#GetNetworkForMagic]
= GetNetworkForMagic
:mrdocs:

Determines which chain a set of network magic bytes belongs to&period;

== Synopsis

Declared in `&lt;kernel&sol;chainparams&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;ChainType&gt;
GetNetworkForMagic(xref:MessageStartChars.adoc[MessageStartChars] const& pchMessageStart);
----

== Return Value

The matching chain type, or an empty optional if unrecognized&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pchMessageStart*
| The message&hyphen;start bytes to identify&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
