コード例 #1
0
ファイル: StartupChainModule.cs プロジェクト: nsavga/NStaker
 public StartupChainModule(Context context, ChainService chainSyncService, NodeConnectionService nodeConnectionService, ILoggerFactory loggerFactory) : base(context)
 {
     this.ChainIndex            = context.ChainIndex;
     this.chainSyncService      = chainSyncService;
     this.nodeConnectionService = nodeConnectionService;
     this.logger = loggerFactory.CreateLogger <StartupChainModule>();
 }
コード例 #2
0
 public ChainService(Context context, NodeConnectionService nodeConnectionService, ILoggerFactory loggerFactory)
     : base(context)
 {
     this.ChainIndex            = this.Context.ChainIndex;
     this.nodeConnectionService = nodeConnectionService;
     this.logger = loggerFactory.CreateLogger <ChainService>();
     this.Disposables.Add(this.ChainIndex.TipChangedSignal);
 }
コード例 #3
0
 public ShutdowhainChainModule(Context context, ChainService chainSyncService, NodeConnectionService nodeConnectionService, ILoggerFactory loggerFactory, WalletStore walletStore) : base(context)
 {
     this.ChainIndex            = context.ChainIndex;
     this.chainSyncService      = chainSyncService;
     this.nodeConnectionService = nodeConnectionService;
     this.walletStore           = walletStore;
     this.logger = loggerFactory.CreateLogger <ShutdowhainChainModule>();
 }
コード例 #4
0
ファイル: StartupWalletModule.cs プロジェクト: nsavga/NStaker
 public StartupWalletModule(Context context, ILoggerFactory loggerFactory, WalletStore walletStore, WalletWorker walletWorker,
                            WalletService walletService, LogFilter logFilter) : base(context)
 {
     this.ChainIndex    = context.ChainIndex;
     this.walletStore   = walletStore;
     this.walletWorker  = walletWorker;
     this.walletService = walletService;
     this.logFilter     = logFilter;
     this.logger        = loggerFactory.CreateLogger <StartupWalletModule>();
 }
コード例 #5
0
 public BlockReceiver(Context context, NodeConnectionService nodeConnectionService,
                      BlockSyncHub blockSyncHub, ChainService chainSyncService, ILoggerFactory loggerFactory, WalletWorker walletWorker)
     : base(context)
 {
     this.nodeConnectionService = nodeConnectionService;
     this.chainIndex            = context.ChainIndex;
     this.chainSyncService      = chainSyncService;
     this.walletWorker          = walletWorker;
     this.logger       = loggerFactory.CreateLogger <BlockReceiver>();
     this.orphanBlocks = new Dictionary <uint256, OrphanBlock>();
     this.BlockSyncHub = blockSyncHub;
 }
コード例 #6
0
        public WalletService(Context context, WalletStore walletStore, MinerService minerService) : base(context)
        {
            this.walletStore  = walletStore;
            this.minerService = minerService;
            this.chainIndex   = context.ChainIndex;

            // Set reserve amount not participating in network protection
            // If no parameters provided current setting is printed
            this.reserveBalance    = 0;
            this.coinbaseMaturity  = 50;
            this.minimumInputValue = 0;
        }
コード例 #7
0
ファイル: DownloadManager.cs プロジェクト: nsavga/NStaker
 public DownloadManager(Context context, NodeConnectionService nodeConnectionService, ChainService chainSyncService,
                        ILoggerFactory loggerFactory, WalletWorker walletWorker, BlockReceiver blockReceiver)
 {
     this.context = context;
     this.nodeConnectionService = nodeConnectionService;
     this.chainIndex            = context.ChainIndex;
     this.chainSyncService      = chainSyncService;
     this.walletWorker          = walletWorker;
     this.blockReceiver         = blockReceiver;
     this.ReceivedBlocks        = new ConcurrentDictionary <uint256, Block>();
     this.Fetchers = new ConcurrentDictionary <DownloadFetcher, Node>();
     this.logger   = loggerFactory.CreateLogger <DownloadManager>();
 }
コード例 #8
0
 public BlockMiner(Context context, NodeConnectionService nodeConnectionService,
                   BlockSyncHub blockSyncHub, ChainService chainSyncService, WalletService walletService, WalletWorker walletWorker,
                   BlockReceiver blockReceiver, MinerService minerService) : base(context)
 {
     this.nodeConnectionService       = nodeConnectionService;
     this.chainIndex                  = context.ChainIndex;
     this.chainSyncService            = chainSyncService;
     this.walletService               = walletService;
     this.walletWorker                = walletWorker;
     this.blockReceiver               = blockReceiver;
     this.minerService                = minerService;
     this.BlockSyncHub                = blockSyncHub;
     this.minerSleep                  = 500; // GetArg("-minersleep", 500);
     this.LastCoinStakeSearchInterval = 0;
     this.LastCoinStakeSearchTime     = DateTime.UtcNow.ToUnixTimestamp();
 }
コード例 #9
0
ファイル: StartupIndexModule.cs プロジェクト: nsavga/NStaker
 public StartupIndexModule(Context context, ILoggerFactory loggerFactory, LogFilter logFilter) : base(context)
 {
     this.ChainIndex = context.ChainIndex;
     this.logFilter  = logFilter;
     this.logger     = loggerFactory.CreateLogger <StartupIndexModule>();
 }
コード例 #10
0
 public GetDataReceiver(Context context, BlockSyncHub blockSyncHub, MinerService minerService) : base(context)
 {
     this.minerService = minerService;
     this.BlockSyncHub = blockSyncHub;
     this.chainIndex   = context.ChainIndex;
 }