Example #1
0
        public PosMinting(ConsensusLoop consensusLoop, ConcurrentChain chain, Network network, ConnectionManager connection,
                          IDateTimeProvider dateTimeProvider, AssemblerFactory blockAssemblerFactory, BlockRepository blockRepository,
                          BlockStore.ChainBehavior.ChainState chainState, Signals signals, FullNode.CancellationProvider cancellationProvider,
                          NodeSettings settings, CoinView coinView, StakeChain stakeChain)
        {
            this.consensusLoop         = consensusLoop;
            this.chain                 = chain;
            this.network               = network;
            this.connection            = connection;
            this.dateTimeProvider      = dateTimeProvider;
            this.blockAssemblerFactory = blockAssemblerFactory;
            this.blockRepository       = blockRepository;
            this.chainState            = chainState;
            this.signals               = signals;
            this.cancellationProvider  = cancellationProvider;
            this.settings              = settings;
            this.coinView              = coinView;
            this.stakeChain            = stakeChain;

            this.minerSleep = 500;                                                                          // GetArg("-minersleep", 500);
            this.lastCoinStakeSearchTime = Utils.DateTimeToUnixTime(this.dateTimeProvider.GetTimeOffset()); // startup timestamp
            this.reserveBalance          = 0;                                                               // TOOD:settings.ReserveBalance
            this.minimumInputValue       = 0;

            this.posConsensusValidator = consensusLoop.Validator as PosConsensusValidator;
        }
 public ConsensusFeature(
     DBreezeCoinView dBreezeCoinView,
     Network network,
     PowConsensusValidator consensusValidator,
     ConcurrentChain chain,
     LookaheadBlockPuller blockPuller,
     CoinView coinView,
     ChainBehavior.ChainState chainState,
     ConnectionManager connectionManager,
     CancellationProvider globalCancellation,
     Signals signals,
     ConsensusLoop consensusLoop,
     NodeSettings nodeSettings,
     StakeChainStore stakeChain = null)
 {
     this.dBreezeCoinView    = dBreezeCoinView;
     this.consensusValidator = consensusValidator;
     this.chain              = chain;
     this.blockPuller        = blockPuller;
     this.coinView           = coinView;
     this.chainState         = chainState;
     this.connectionManager  = connectionManager;
     this.globalCancellation = globalCancellation;
     this.signals            = signals;
     this.network            = network;
     this.consensusLoop      = consensusLoop;
     this.nodeSettings       = nodeSettings;
     this.stakeChain         = stakeChain;
 }
Example #3
0
 public ConsensusFeature(
     DBreezeCoinView dBreezeCoinView,
     Network network,
     PowConsensusValidator consensusValidator,
     ConcurrentChain chain,
     LookaheadBlockPuller blockPuller,
     CoinView coinView,
     ChainBehavior.ChainState chainState,
     IConnectionManager connectionManager,
     INodeLifetime nodeLifetime,
     Signals signals,
     ConsensusLoop consensusLoop,
     NodeSettings nodeSettings,
     NodeDeployments nodeDeployments,
     StakeChainStore stakeChain = null)
 {
     this.dBreezeCoinView    = dBreezeCoinView;
     this.consensusValidator = consensusValidator;
     this.chain             = chain;
     this.blockPuller       = blockPuller;
     this.coinView          = coinView;
     this.chainState        = chainState;
     this.connectionManager = connectionManager;
     this.nodeLifetime      = nodeLifetime;
     this.signals           = signals;
     this.network           = network;
     this.consensusLoop     = consensusLoop;
     this.nodeSettings      = nodeSettings;
     this.nodeDeployments   = nodeDeployments;
     this.stakeChain        = stakeChain;
 }
 public BlockNotificationFeature(BlockNotification blockNotification, FullNode.CancellationProvider cancellationProvider, ConnectionManager connectionManager, LookaheadBlockPuller blockPuller, ChainBehavior.ChainState chainState, ConcurrentChain chain)
 {
     this.blockNotification    = blockNotification;
     this.cancellationProvider = cancellationProvider;
     this.connectionManager    = connectionManager;
     this.blockPuller          = blockPuller;
     this.chainState           = chainState;
     this.chain = chain;
 }
 public PowMining(ConsensusLoop consensusLoop, ConcurrentChain chain, Network network,
                  IDateTimeProvider dateTimeProvider, AssemblerFactory blockAssemblerFactory, BlockRepository blockRepository,
                  BlockStore.ChainBehavior.ChainState chainState, Signals signals, FullNode.CancellationProvider cancellationProvider)
 {
     this.consensusLoop         = consensusLoop;
     this.chain                 = chain;
     this.network               = network;
     this.dateTimeProvider      = dateTimeProvider;
     this.blockAssemblerFactory = blockAssemblerFactory;
     this.blockRepository       = blockRepository;
     this.chainState            = chainState;
     this.signals               = signals;
     this.cancellationProvider  = cancellationProvider;
 }
 public PowMining(ConsensusLoop consensusLoop, ConcurrentChain chain, Network network,
                  IDateTimeProvider dateTimeProvider, AssemblerFactory blockAssemblerFactory, BlockRepository blockRepository,
                  BlockStore.ChainBehavior.ChainState chainState, Signals signals, INodeLifetime nodeLifetime, IAsyncLoopFactory asyncLoopFactory)
 {
     this.consensusLoop         = consensusLoop;
     this.chain                 = chain;
     this.network               = network;
     this.dateTimeProvider      = dateTimeProvider;
     this.blockAssemblerFactory = blockAssemblerFactory;
     this.blockRepository       = blockRepository;
     this.chainState            = chainState;
     this.signals               = signals;
     this.nodeLifetime          = nodeLifetime;
     this.asyncLoopFactory      = asyncLoopFactory;
 }
        public ConsensusStats(CoinViewStack stack, CoinView coinView, ConsensusLoop consensusLoop, ChainBehavior.ChainState chainState, ConcurrentChain chain, IConnectionManager connectionManager)
        {
            stack        = new CoinViewStack(coinView);
            this.cache   = stack.Find <CachedCoinView>();
            this.dbreeze = stack.Find <DBreezeCoinView>();
            this.bottom  = stack.Bottom;

            this.consensusLoop   = consensusLoop;
            this.lookaheadPuller = this.consensusLoop.Puller as LookaheadBlockPuller;

            this.lastSnapshot      = consensusLoop.Validator.PerformanceCounter.Snapshot();
            this.lastSnapshot2     = this.dbreeze?.PerformanceCounter.Snapshot();
            this.lastSnapshot3     = this.cache?.PerformanceCounter.Snapshot();
            this.chainState        = chainState;
            this.chain             = chain;
            this.connectionManager = connectionManager;
        }
 public FullNodeController(
     IFullNode fullNode                             = null,
     NodeSettings nodeSettings                      = null,
     Network network                                = null,
     ConsensusValidator consensusValidator          = null,
     ConcurrentChain chain                          = null,
     ChainBehavior.ChainState chainState            = null,
     BlockStoreManager blockManager                 = null,
     MempoolManager mempoolManager                  = null,
     Connection.ConnectionManager connectionManager = null)
     : base(
         fullNode: fullNode,
         nodeSettings: nodeSettings,
         network: network,
         consensusValidator: consensusValidator,
         chain: chain,
         chainState: chainState,
         blockManager: blockManager,
         mempoolManager: mempoolManager,
         connectionManager: connectionManager)
 {
 }
Example #9
0
 public BaseRPCController(
     IFullNode fullNode        = null,
     NodeSettings nodeSettings = null,
     Network network           = null,
     PowConsensusValidator consensusValidator = null,
     ConsensusLoop consensusLoop                    = null,
     ConcurrentChain chain                          = null,
     ChainBehavior.ChainState chainState            = null,
     BlockStoreManager blockManager                 = null,
     MempoolManager mempoolManager                  = null,
     Connection.ConnectionManager connectionManager = null)
 {
     this._FullNode           = fullNode;
     this._Settings           = nodeSettings;
     this._Network            = network;
     this._ConsensusValidator = consensusValidator;
     this._ConsensusLoop      = consensusLoop;
     this._Chain             = chain;
     this._ChainState        = chainState;
     this._BlockManager      = blockManager;
     this._MempoolManager    = mempoolManager;
     this._ConnectionManager = connectionManager;
 }
 public ConsensusController(ChainBehavior.ChainState chainState = null, ConsensusLoop consensusLoop = null, ConcurrentChain chain = null)
     : base(chainState: chainState, consensusLoop: consensusLoop, chain: chain)
 {
 }