Ejemplo n.º 1
0
 RepositoryTester(string name, bool caching)
 {
     _Name = name;
     ServerTester.DeleteFolderRecursive(name);
     _Provider = new RepositoryProvider(new NBXplorerNetworkProvider(NetworkType.Regtest),
                                        new Configuration.ExplorerConfiguration()
     {
         DataDir             = name,
         ChainConfigurations = new List <Configuration.ChainConfiguration>()
         {
             new Configuration.ChainConfiguration()
             {
                 CryptoCode = "BTC",
                 Rescan     = false
             }
         }
     });
     _Repository = _Provider.GetRepository(new NBXplorerNetworkProvider(NetworkType.Regtest).GetFromCryptoCode("BTC"));
 }
Ejemplo n.º 2
0
 RepositoryTester(string name, bool caching)
 {
     _Name = name;
     ServerTester.DeleteFolderRecursive(name);
     _Provider = new RepositoryProvider(new NBXplorerNetworkProvider(ChainName.Regtest),
                                        KeyPathTemplates.Default,
                                        new Configuration.ExplorerConfiguration()
     {
         DataDir             = name,
         ChainConfigurations = new List <Configuration.ChainConfiguration>()
         {
             new Configuration.ChainConfiguration()
             {
                 CryptoCode = "BTC",
                 Rescan     = false
             }
         }
     });
     _Provider.StartAsync(default).GetAwaiter().GetResult();
Ejemplo n.º 3
0
 public void Dispose()
 {
     _Provider.DisposeAsync().GetAwaiter().GetResult();
     ServerTester.DeleteFolderRecursive(_Name);
 }
Ejemplo n.º 4
0
 public void Dispose()
 {
     _Provider.Dispose();
     ServerTester.DeleteFolderRecursive(_Name);
 }