Example #1
0
 public static void AssignNetwork(NetworkType networkType)
 {
     if (!Networks.IsValueCreated)
     {
         throw new InvalidOperationException("RootService is not bootstrapped");
     }
     _bitcoinNetwork = CreateNetwork(networkType);
 }
Example #2
0
 public static void Bootstrap(NetworkType networkType)
 {
     if (_bitcoinNetwork != null)
     {
         throw new InvalidOperationException();
     }
     lock (Mutex)
     {
         _bitcoinNetwork = CreateNetwork(networkType);
     }
 }