Skip to content

Commit

Permalink
Fix Network.GetNetwork always returning null
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Nov 14, 2024
1 parent 4c5b2ac commit 2c58a78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NBitcoin/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,9 @@ public static IEnumerable<Network> GetNetworks()
if (name == null)
throw new ArgumentNullException(nameof(name));
name = name.ToLowerInvariant();

// Init Bitcoin networks
if (_OtherAliases.Count is 0)
Bitcoin.Instance.GetNetwork(ChainName.Regtest);
return _OtherAliases.TryGet(name);
}

Expand Down

0 comments on commit 2c58a78

Please sign in to comment.