private static void Coordinator_CoinJoinBroadcasted(object sender, Transaction tx)
 {
     try
     {
         lock (UpdateUnversionedLock)
         {
             if (Last5CoinJoins.Count > 4)
             {
                 Last5CoinJoins.RemoveLast();
             }
             Last5CoinJoins.Insert(0, tx.GetHash().ToString());
             UnversionedWebBuilder.UpdateCoinJoinsHtml(Last5CoinJoins);
         }
     }
     catch (Exception ex)
     {
         Logger.LogWarning(ex, nameof(Program));
     }
 }
Exemple #2
0
        private static void Coordinator_CoinJoinBroadcasted(object sender, Transaction tx)
        {
            try
            {
                lock (UpdateUnversionedLock)
                {
                    Money volume = tx.GetIndistinguishableOutputs(includeSingle: false).Sum(x => x.count * x.value);
                    TotalVolume += volume;
                    UnversionedWebBuilder.UpdateMixedTextHtml(TotalVolume);

                    if (Last5CoinJoins.Count > 4)
                    {
                        Last5CoinJoins.RemoveLast();
                    }
                    Last5CoinJoins.Insert(0, tx.GetHash().ToString());
                    UnversionedWebBuilder.UpdateCoinJoinsHtml(Last5CoinJoins);
                }
            }
            catch (Exception ex)
            {
                Logger.LogWarning(ex, nameof(Program));
            }
        }