public void TestRpcPeers() { JObject json = TestUtils.RpcTestCases.Find(p => p.Name == nameof(RpcClient.GetPeersAsync).ToLower()).Response.Result; var item = RpcPeers.FromJson(json); Assert.AreEqual(json.ToString(), item.ToJson().ToString()); }
/// <summary> /// Gets the list of nodes that the node is currently connected/disconnected from. /// </summary> public async Task <RpcPeers> GetPeersAsync() { var result = await RpcSendAsync(GetRpcName()).ConfigureAwait(false); return(RpcPeers.FromJson(result)); }
/// <summary> /// Gets the list of nodes that the node is currently connected/disconnected from. /// </summary> public RpcPeers GetPeers() { return(RpcPeers.FromJson(RpcSend("getpeers"))); }