Closed marekyggdrasil closed 3 years ago
Goal of this issue is to test the get_connected_peers
API method.
get_connected_peers
API method.Output should match the example. Include all cURL requests and responses.
Include the exact version of your grin-node and also your environment.
uname -a
OS: Debian 10\
Grin Node: grin 5.0.0-rc.2
System Info: Linux debian3 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
$ cd grin-5.0.0-rc.2/target/release/
$ ./grin
get_connected_peers
API method$ curl localhost:3413/v2/owner -d '{"jsonrpc": "2.0", "method": "get_connected_peers", "params": [], "id": 1}' -w "\n"
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"Ok": [
{
"addr": "176.9.86.219:3414",
"capabilities": {
"bits": 31
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 5.0.0-rc.2",
"version": 1000
},
{
"addr": "47.97.218.157:3414",
"capabilities": {
"bits": 15
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 4.1.1",
"version": 1000
},
{
"addr": "213.239.217.14:3414",
"capabilities": {
"bits": 31
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 5.0.0-rc.2",
"version": 1000
},
{
"addr": "18.204.166.78:3414",
"capabilities": {
"bits": 15
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 4.0.0",
"version": 2
},
{
"addr": "108.196.200.233:3414",
"capabilities": {
"bits": 31
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 5.0.0-rc.1",
"version": 1000
},
{
"addr": "35.181.35.93:3414",
"capabilities": {
"bits": 15
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 4.0.0",
"version": 2
},
{
"addr": "49.12.108.173:3414",
"capabilities": {
"bits": 15
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 4.1.1",
"version": 1000
},
{
"addr": "85.10.201.143:3414",
"capabilities": {
"bits": 31
},
"direction": "Outbound",
"height": 1025939,
"total_difficulty": 1738767380427710,
"user_agent": "MW/Grin 5.0.0-rc.2",
"version": 1000
}
]
}
}
No errors encountered. The actual results matches the expected results.
Great work! Thanks @goyle !
Description Goal of this issue is to test the get_connected_peers API method
Prerequisites
Test procedure
Expected result:
Output should match the example. Include all cURL requests and responses.
Include the exact version of your grin-node and also your environment