示例#1
0
        public void TestRpcRawMemPool()
        {
            JObject json = TestUtils.RpcTestCases.Find(p => p.Name == nameof(RpcClient.GetRawMempoolBothAsync).ToLower()).Response.Result;
            var     item = RpcRawMemPool.FromJson(json);

            Assert.AreEqual(json.ToString(), item.ToJson().ToString());
        }
示例#2
0
        public void TestToJson()
        {
            var pool = new RpcRawMemPool
            {
                Height   = 1,
                Verified = new string[] {
                    "a", "b"
                },
                UnVerified = new string[] {
                    "c", "d"
                }
            };
            var json = pool.ToJson();

            json["height"].AsNumber().Should().Be(1);
            json["verified"].AsString().Should().Be("a,b");
            json["unverified"].AsString().Should().Be("c,d");
        }
示例#3
0
        /// <summary>
        /// Obtains the list of unconfirmed transactions in memory.
        /// shouldGetUnverified = true
        /// </summary>
        public async Task <RpcRawMemPool> GetRawMempoolBothAsync()
        {
            var result = await RpcSendAsync(GetRpcName(), true).ConfigureAwait(false);

            return(RpcRawMemPool.FromJson(result));
        }
示例#4
0
文件: RpcClient.cs 项目: jz263/neo
 /// <summary>
 /// Obtains the list of unconfirmed transactions in memory.
 /// shouldGetUnverified = true
 /// </summary>
 public RpcRawMemPool GetRawMempoolBoth()
 {
     return(RpcRawMemPool.FromJson(RpcSend("getrawmempool", true)));
 }