Ejemplo n.º 1
0
        public static bool IsNextBlock()
        {
            uint newBlockCount = 0;

            try
            {
                newBlockCount = CoinService.GetBlockCount();
            }
            catch (RpcException exception)
            {
                //                Debug.WriteLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception);
                bitcoin_Logger.LogLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception, responseTip.Helpers.Logger.log_types.ERROR_LOG);
                //                newBtcAdress = "RPC exception";
            }
            catch (Exception e)
            {
                //                Debug.WriteLine("General exception at: " + e.StackTrace);
                bitcoin_Logger.LogLine("General exception at: " + e.StackTrace, responseTip.Helpers.Logger.log_types.ERROR_LOG);
                //                newBtcAdress = "General exception";
            }

            if (newBlockCount > currentBlockCount)
            {
                currentBlockCount = newBlockCount;
                EstimateTxFee();
                return(true);
            }
            else
            {
                return(false);
            }
        }