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()); }
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"); }
/// <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)); }
/// <summary> /// Obtains the list of unconfirmed transactions in memory. /// shouldGetUnverified = true /// </summary> public RpcRawMemPool GetRawMempoolBoth() { return(RpcRawMemPool.FromJson(RpcSend("getrawmempool", true))); }