Exemple #1
0
        private void RemoveCoin(SmartCoin coinWaitingForMix, string reason = null)
        {
            State.RemoveCoinFromWaitingList(coinWaitingForMix);
            coinWaitingForMix.CoinJoinInProgress = false;
            coinWaitingForMix.Secret             = null;
            CoinDequeued?.Invoke(this, coinWaitingForMix);
            var correctReason = Guard.Correct(reason);
            var reasonText    = correctReason != "" ? $" Reason: {correctReason}" : "";

            Logger.LogInfo <CcjClient>($"Coin dequeued: {coinWaitingForMix.Index}:{coinWaitingForMix.TransactionId}.{reasonText}.");
        }
Exemple #2
0
 private void RemoveCoin(SmartCoin coinWaitingForMix)
 {
     State.RemoveCoinFromWaitingList(coinWaitingForMix);
     coinWaitingForMix.CoinJoinInProgress = false;
     coinWaitingForMix.Secret             = null;
     if (coinWaitingForMix.Label == "ZeroLink Change" && coinWaitingForMix.Unspent)
     {
         coinWaitingForMix.Label = "ZeroLink Dequeued Change";
         var key = KeyManager.GetKeys(x => x.GetP2wpkhScript() == coinWaitingForMix.ScriptPubKey).SingleOrDefault();
         if (!(key is null))
         {
             key.SetLabel(coinWaitingForMix.Label, KeyManager);
         }
     }
     CoinDequeued?.Invoke(this, coinWaitingForMix);
     Logger.LogInfo <CcjClient>($"Coin dequeued: {coinWaitingForMix.Index}:{coinWaitingForMix.TransactionId}.");
 }
        private void RemoveCoin(SmartCoin coinWaitingForMix, string reason = null)
        {
            State.RemoveCoinFromWaitingList(coinWaitingForMix);
            coinWaitingForMix.CoinJoinInProgress = false;
            coinWaitingForMix.Secret             = null;
            if (coinWaitingForMix.Label == "ZeroLink Change" && coinWaitingForMix.Unspent)
            {
                coinWaitingForMix.Label = "ZeroLink Dequeued Change";
                var key = KeyManager.GetKeys(x => x.P2wpkhScript == coinWaitingForMix.ScriptPubKey).SingleOrDefault();
                if (key != null)
                {
                    key.SetLabel(coinWaitingForMix.Label, KeyManager);
                }
            }
            CoinDequeued?.Invoke(this, coinWaitingForMix);
            var correctReason = Guard.Correct(reason);
            var reasonText    = correctReason != "" ? $" Reason: {correctReason}" : "";

            Logger.LogInfo <CcjClient>($"Coin dequeued: {coinWaitingForMix.Index}:{coinWaitingForMix.TransactionId}.{reasonText}");
        }