예제 #1
0
        public static async Task <ApiResponse> GetAllTxInMemPool()
        {
            ApiResponse response = new ApiResponse();

            try
            {
                MemoryPool pool   = new MemoryPool();
                string[]   result = await pool.GetAllTxInMemPool();

                if (result != null)
                {
                    response.Result = Newtonsoft.Json.Linq.JToken.FromObject(result.ToList());
                }
                else
                {
                    response.Result = null;
                }
            }
            catch (ApiCustomException ex)
            {
                Logger.Singleton.Error(ex.ToString());
                response.Error = new ApiError(ex.ErrorCode, ex.ToString());
            }
            catch (Exception ex)
            {
                Logger.Singleton.Error(ex.ToString());
                response.Error = new ApiError(ex.HResult, ex.ToString());
            }
            return(response);
        }
예제 #2
0
        public async Task GetAllTxInMemPool()
        {
            MemoryPool pool = new MemoryPool();

            string[] result = await pool.GetAllTxInMemPool();

            Assert.IsNotNull(result);
        }