예제 #1
0
        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());
        }
예제 #2
0
        /// <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));
        }
예제 #3
0
파일: RpcClient.cs 프로젝트: jz263/neo
 /// <summary>
 /// Gets the list of nodes that the node is currently connected/disconnected from.
 /// </summary>
 public RpcPeers GetPeers()
 {
     return(RpcPeers.FromJson(RpcSend("getpeers")));
 }