Example #1
0
        public void Recache()
        {
            BlocksCache.Recache(); // recache the blocks.
            NetworkInfo.Recache(); // let network statistics recache.
            CalculateHashrate();   // calculate the pool hashrate.
            RecacheRound();        // recache current round.

            // cache the json-service response
            ServiceResponse = JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            });
        }
Example #2
0
        public void Recache()
        {
            if (!Initialized)
            {
                return;
            }

            BlockRepository.Recache();                 // recache the blocks.
            NetworkInfo.Recache();                     // let network statistics recache.
            CalculateHashrate();                       // calculate the pool hashrate.

            RoundShares = _storage.GetCurrentShares(); // recache current round.

            // cache the json-service response
            ServiceResponse = JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore
            });
        }