You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One cannot run NetworkBuilder.BuildAndRegister() to create a Network before triggering the static ctor of Network one time before so that it already creates BitcoinMain. Otherwise, this line will crash:
assert(consensus.HashGenesisBlock == uint256.Parse("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
This can be worked around like shown below, but it's very confusing :-)
public static void Main(string[] args)
{
var fix= Network.Main; // execute static constructor of Network before everything else, or crash
var network = !args.Contains("-testnet")
? MyNetworks.RegisterMain()
: MyNetworks.RegisterTest();
if (NodeSettings.PrintHelp(args, network))
return;
The text was updated successfully, but these errors were encountered:
One cannot run NetworkBuilder.BuildAndRegister() to create a Network before triggering the static ctor of Network one time before so that it already creates BitcoinMain. Otherwise, this line will crash:
assert(consensus.HashGenesisBlock == uint256.Parse("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));
This can be worked around like shown below, but it's very confusing :-)
The text was updated successfully, but these errors were encountered: