Ejemplo n.º 1
0
        bool ConfirmTransaction(Logger log, string host, Hash hash, int maxTries = 99999)
        {
            int tryCount = 0;

            do
            {
                var confirmations = nexus.GetConfirmationsOfHash(hash);
                if (confirmations > 0)
                {
                    if (log != null)
                    {
                        log.Success("Confirmations: " + confirmations);
                    }
                    return(true);
                }

                tryCount--;
                if (tryCount >= maxTries)
                {
                    return(false);
                }

                Thread.Sleep(500);
            } while (true);
        }
Ejemplo n.º 2
0
        bool ConfirmTransaction(string host, Hash hash, int maxTries = 99999)
        {
            int tryCount = 0;

            do
            {
                var confirmations = nexus.GetConfirmationsOfHash(hash);
                if (confirmations > 0)
                {
                    return(true);
                }

                tryCount--;
                if (tryCount >= maxTries)
                {
                    return(false);
                }

                Thread.Sleep(500);
            } while (true);
        }