public RPCTrustedBroadcastService(RPCClient rpc, IBroadcastService innerBroadcast, IBlockExplorerService explorer, IRepository repository, RPCWalletCache cache, Tracker tracker)
 {
     if (rpc == null)
     {
         throw new ArgumentNullException(nameof(rpc));
     }
     if (innerBroadcast == null)
     {
         throw new ArgumentNullException(nameof(innerBroadcast));
     }
     if (repository == null)
     {
         throw new ArgumentNullException(nameof(repository));
     }
     if (explorer == null)
     {
         throw new ArgumentNullException(nameof(explorer));
     }
     if (tracker == null)
     {
         throw new ArgumentNullException(nameof(tracker));
     }
     if (cache == null)
     {
         throw new ArgumentNullException(nameof(cache));
     }
     _Repository  = repository;
     _RPCClient   = rpc;
     _Broadcaster = innerBroadcast;
     TrackPreviousScriptPubKey = true;
     _BlockExplorer            = explorer;
     _Tracker = tracker;
     _Cache   = cache;
 }
Esempio n. 2
0
 public RPCBlockExplorerService(RPCClient client, RPCWalletCache cache, IRepository repo)
 {
     _RPCClient = client ?? throw new ArgumentNullException(nameof(client));
     _Repo      = repo ?? throw new ArgumentNullException("repo");
     _Cache     = cache ?? throw new ArgumentNullException("cache");
     _RPCBatch  = new RPCBatch <bool>(client);
 }
Esempio n. 3
0
 public RPCBroadcastService(RPCClient rpc, RPCWalletCache cache, IRepository repository)
 {
     _RPCClient            = rpc ?? throw new ArgumentNullException(nameof(rpc));
     _Repository           = repository ?? throw new ArgumentNullException(nameof(repository));
     _Cache                = cache;
     _BlockExplorerService = new RPCBlockExplorerService(rpc, cache, repository);
     _RPCBatch             = new RPCBatch <bool>(_RPCClient);
 }
 public RPCBroadcastService(RPCClient rpc, RPCWalletCache cache, IRepository repository)
 {
     if (rpc == null)
     {
         throw new ArgumentNullException(nameof(rpc));
     }
     if (repository == null)
     {
         throw new ArgumentNullException(nameof(repository));
     }
     _RPCClient            = rpc;
     _Repository           = repository;
     _Cache                = cache;
     _BlockExplorerService = new RPCBlockExplorerService(rpc, cache, repository);
 }
Esempio n. 5
0
 public RPCBlockExplorerService(RPCClient client, RPCWalletCache cache, IRepository repo)
 {
     if (client == null)
     {
         throw new ArgumentNullException(nameof(client));
     }
     if (repo == null)
     {
         throw new ArgumentNullException("repo");
     }
     if (cache == null)
     {
         throw new ArgumentNullException("cache");
     }
     _RPCClient = client;
     _Repo      = repo;
     _Cache     = cache;
 }