public LightWalletSyncManager(
            ILoggerFactory loggerFactory,
            IWalletManager walletManager,
            ChainIndexer chainIndexer,
            Network network,
            IBlockNotification blockNotification,
            ISignals signals,
            INodeLifetime nodeLifetime,
            IAsyncProvider asyncProvider,
            IConsensusManager consensusManager)
        {
            Guard.NotNull(loggerFactory, nameof(loggerFactory));
            Guard.NotNull(walletManager, nameof(walletManager));
            Guard.NotNull(chainIndexer, nameof(chainIndexer));
            Guard.NotNull(network, nameof(network));
            Guard.NotNull(blockNotification, nameof(blockNotification));
            Guard.NotNull(signals, nameof(signals));
            Guard.NotNull(nodeLifetime, nameof(nodeLifetime));
            Guard.NotNull(asyncProvider, nameof(asyncProvider));
            Guard.NotNull(consensusManager, nameof(consensusManager));

            this.walletManager     = walletManager;
            this.chainIndexer      = chainIndexer;
            this.signals           = signals;
            this.blockNotification = blockNotification;
            this.logger            = loggerFactory.CreateLogger(this.GetType().FullName);
            this.nodeLifetime      = nodeLifetime;
            this.asyncProvider     = asyncProvider;
            this.consensusManager  = consensusManager;
        }
 public BlockNotificationFeature(IBlockNotification blockNotification, IConnectionManager connectionManager,
                                 IConsensusManager consensusManager, IChainState chainState, ConcurrentChain chain, ILoggerFactory loggerFactory)
 {
     this.blockNotification = blockNotification;
     this.connectionManager = connectionManager;
     this.consensusManager  = consensusManager;
     this.chainState        = chainState;
     this.chain             = chain;
     this.loggerFactory     = loggerFactory;
 }
Beispiel #3
0
        public SimpleWalletManager(
            ILoggerFactory loggerFactory,
            ConcurrentChain chain,
            IBlockStore blockStoreCache,
            INodeLifetime nodeLifetime,
            HubCommands hubCommands,
            IBlockNotification blockNotification)
        {
            this.logger            = loggerFactory.CreateLogger(this.GetType().FullName);
            this.network           = chain.Network;
            this.chain             = chain;
            this.blockNotification = blockNotification;
            this.nodeLifetime      = nodeLifetime;
            this.blockStoreCache   = blockStoreCache;
            this.hubCommands       = hubCommands;

            this.coinType = (CoinType)this.network.Consensus.CoinType;
        }
        public RegistrationFeature(ILoggerFactory loggerFactory,
                                   NodeSettings nodeSettings,
                                   RegistrationManager registrationManager,
                                   RegistrationStore registrationStore,
                                   ConcurrentChain chain,
                                   Signals signals,
                                   IWatchOnlyWalletManager watchOnlyWalletManager,
                                   IBlockNotification blockNotification,
                                   IWalletSyncManager walletSyncManager)
        {
            this.loggerFactory       = loggerFactory;
            this.logger              = loggerFactory.CreateLogger(this.GetType().FullName);
            this.nodeSettings        = nodeSettings;
            this.registrationManager = registrationManager;
            this.registrationStore   = registrationStore;
            this.chain   = chain;
            this.signals = signals;
            this.network = nodeSettings.Network;
            this.watchOnlyWalletManager = watchOnlyWalletManager;
            this.blockNotification      = blockNotification as BlockNotification;
            this.walletSyncManager      = walletSyncManager;

            if (nodeSettings.Network == Network.Main || nodeSettings.Network == Network.TestNet || nodeSettings.Network == Network.RegTest)
            {
                // Bitcoin networks - these currently only interrogate the registration store for initial masternode selection
                this.isBitcoin = true;
            }
            else
            {
                // Stratis networks - these write to the registration store as new registrations come in via blocks
                this.isBitcoin = false;

                // Force registration store to be kept in same folder as other node data
                this.registrationStore.SetStorePath(this.nodeSettings.DataDir);
            }
        }
 public LightWalletSyncManagerOverride(ILoggerFactory loggerFactory, IWalletManager walletManager, ConcurrentChain chain,
                                       Network network, IBlockNotification blockNotification, ISignals signals, INodeLifetime nodeLifetime, IAsyncLoopFactory asyncLoopFactory, IConsensusManager consensusManager)
     : base(loggerFactory, walletManager, chain, network, blockNotification, signals, nodeLifetime, asyncLoopFactory, consensusManager)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationsController"/> class.
 /// </summary>
 /// <param name="blockNotification">The block notification.</param>
 /// <param name="chainIndexer">The chain.</param>
 public NotificationsController(IBlockNotification blockNotification, ChainIndexer chainIndexer)
 {
     this.blockNotification = blockNotification;
     this.chainIndexer      = chainIndexer;
 }
Beispiel #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NotificationsController"/> class.
 /// </summary>
 /// <param name="blockNotification">The block notification.</param>
 /// <param name="chain">The chain.</param>
 public NotificationsController(IBlockNotification blockNotification, ConcurrentChain chain)
 {
     this.blockNotification = blockNotification;
     this.chain             = chain;
 }