Inheritance: INetworkInterface
        public PoolInterface(string minerAddress, string poolURL, int maxScanRetry, int updateInterval, int hashratePrintInterval,
                             ulong customDifficulity, bool isSecondary, HexBigInteger maxTarget, PoolInterface secondaryPool = null)
        {
            m_retryCount            = 0;
            m_maxScanRetry          = maxScanRetry;
            m_customDifficulity     = customDifficulity;
            m_maxTarget             = maxTarget;
            m_updateInterval        = updateInterval;
            m_isGetMiningParameters = false;
            LastSubmitLatency       = -1;
            Latency         = -1;
            SecondaryPool   = secondaryPool;
            IsSecondaryPool = isSecondary;

            if (m_customDifficulity > 0)
            {
                Difficulty = m_customDifficulity;
            }

            MinerAddress    = minerAddress;
            s_PoolURL       = poolURL;
            SubmittedShares = 0ul;
            RejectedShares  = 0ul;

            m_submitDateTimeList = new List <DateTime>(MAX_SUBMIT_DTM_COUNT + 1);

            if (hashratePrintInterval > 0)
            {
                m_hashPrintTimer          = new Timer(hashratePrintInterval);
                m_hashPrintTimer.Elapsed += m_hashPrintTimer_Elapsed;
                m_hashPrintTimer.Start();
            }
        }
Beispiel #2
0
        public PoolInterface(string minerAddress, string poolURL, int maxScanRetry, int updateInterval, uint customDifficulity,
                             HexBigInteger maxTarget, PoolInterface secondaryPool = null)
        {
            m_retryCount        = 0;
            m_maxScanRetry      = maxScanRetry;
            m_customDifficulity = customDifficulity;
            m_maxTarget         = maxTarget;
            m_updateInterval    = updateInterval;
            SecondaryPool       = secondaryPool;

            if (m_customDifficulity > 0)
            {
                Difficulty = m_customDifficulity;
            }

            s_MinerAddress  = minerAddress;
            s_PoolURL       = poolURL;
            SubmittedShares = 0ul;
            RejectedShares  = 0ul;
        }