public bool Contains(uint256 hash) { lock (Lock) { return(ConfirmedStore.Contains(hash) || MempoolStore.Contains(hash)); } }
private void EnsureConsistency() { lock (Lock) { var mempoolTransactions = MempoolStore.GetTransactionHashes(); foreach (var hash in mempoolTransactions) { // Contains is fast, so do this first. if (ConfirmedStore.Contains(hash) && MempoolStore.TryRemove(hash, out var uTx)) { ConfirmedStore.TryAddOrUpdate(uTx); } } } }