public bool Contains(SmartCoin coin) { lock (StateLock) { return(WaitingList.ContainsKey(coin) || Rounds.Any(x => x.CoinsRegistered.Contains(coin))); } }
public void RemoveCoinFromWaitingList(SmartCoin coin) { lock (StateLock) { if (WaitingList.ContainsKey(coin)) { WaitingList.Remove(coin); Logger.LogInfo <CcjClientState>($"Coin removed from the waiting list: {coin.Index}:{coin.TransactionId}."); } } }
public void AddCoinToWaitingList(SmartCoin coin) { lock (StateLock) { if (!(WaitingList.ContainsKey(coin) || Rounds.Any(x => x.CoinsRegistered.Contains(coin)))) { WaitingList.Add(coin, DateTimeOffset.UtcNow); Logger.LogInfo <CcjClientState>($"Coin added to the waiting list: {coin.Index}:{coin.TransactionId}."); } } }