Example #1
0
        public bool AttemptToMineSingleCryptoCrown(long key)
        {
            CryptoCrown cc = Mine.Try(key);

            if (cc != null)
            {
                Wallet.InsertCrown(cc);
                ReportWalletContent();
                return(true);
            }

            return(false);
        }
Example #2
0
        public bool Insert(CryptoCrown cc)
        {
            if (cc.Key == _nextValidKey)
            {
                lock (_lock)
                {
                    _crowns.Add(cc);
                    _maxKey       = NextMaxKey;
                    _nextValidKey = NextValidKey;
                }
                return(true);
            }

            return(false);
        }