Why getpeerinfo call is returning duplicates

+2 votes
Hi, I am running getpeerinfo from command line. It returns duplicate records  and duplicates are increasing after some time when I re run the command. Can somebody explain me why it is happening ?

 

E:\blockchain\multichain2-node1>multichain-cli chain1 getpeerinfo
{"method":"getpeerinfo","params":[],"id":1,"chain_name":"chain1"}

[
    {
        "id" : 9,
        "addr" : "172.25.48.1:62294",
        "addrlocal" : "172.25.48.1:8355",
        "services" : "0000000000000001",
        "lastsend" : 1538710423,
        "lastrecv" : 1538710423,
        "bytessent" : 2928,
        "bytesrecv" : 2984,
        "conntime" : 1538710292,
        "pingtime" : 0.027304,
        "version" : 70002,
        "subver" : "/MultiChain:0.2.0.1/",
        "handshakelocal" : "1VXn751tqGdYGoRZsqxJTNwrUwmVjCwdqnkKgS",
        "handshake" : "1JwwzoRSWg7xEBm6n87EEbWcY9cxp5Yr9KUJcT",
        "inbound" : true,
        "startingheight" : 1180,
        "banscore" : 0,
        "synced_headers" : 1180,
        "synced_blocks" : 1180,
        "inflight" : [
        ],
        "whitelisted" : false
    },
    {
        "id" : 10,
        "addr" : "192.168.2.4:62295",
        "addrlocal" : "192.168.2.4:8355",
        "services" : "0000000000000001",
        "lastsend" : 1538710419,
        "lastrecv" : 1538710419,
        "bytessent" : 2894,
        "bytesrecv" : 2920,
        "conntime" : 1538710293,
        "pingtime" : 0.027222,
        "version" : 70002,
        "subver" : "/MultiChain:0.2.0.1/",
        "handshakelocal" : "1VXn751tqGdYGoRZsqxJTNwrUwmVjCwdqnkKgS",
        "handshake" : "1JwwzoRSWg7xEBm6n87EEbWcY9cxp5Yr9KUJcT",
        "inbound" : true,
        "startingheight" : 1180,
        "banscore" : 0,
        "synced_headers" : 1180,
        "synced_blocks" : 1180,
        "inflight" : [
        ],
        "whitelisted" : false
    },
    {
        "id" : 11,
        "addr" : "192.168.2.4:10261",
        "addrlocal" : "192.168.2.4:62296",
        "services" : "0000000000000001",
        "lastsend" : 1538710419,
        "lastrecv" : 1538710419,
        "bytessent" : 2389,
        "bytesrecv" : 2893,
        "conntime" : 1538710293,
        "pingtime" : 0.026723,
        "version" : 70002,
        "subver" : "/MultiChain:0.2.0.1/",
        "handshakelocal" : "1VXn751tqGdYGoRZsqxJTNwrUwmVjCwdqnkKgS",
        "handshake" : "1JwwzoRSWg7xEBm6n87EEbWcY9cxp5Yr9KUJcT",
        "inbound" : false,
        "startingheight" : 1180,
        "banscore" : 0,
        "synced_headers" : 1180,
        "synced_blocks" : 1180,
        "inflight" : [
        ],
        "whitelisted" : false
    },
    {
        "id" : 12,
        "addr" : "172.25.48.1:10261",
        "addrlocal" : "172.25.48.1:62297",
        "services" : "0000000000000001",
        "lastsend" : 1538710419,
        "lastrecv" : 1538710419,
        "bytessent" : 2389,
        "bytesrecv" : 2894,
        "conntime" : 1538710294,
        "pingtime" : 0.020252,
        "version" : 70002,
        "subver" : "/MultiChain:0.2.0.1/",
        "handshakelocal" : "1VXn751tqGdYGoRZsqxJTNwrUwmVjCwdqnkKgS",
        "handshake" : "1JwwzoRSWg7xEBm6n87EEbWcY9cxp5Yr9KUJcT",
        "inbound" : false,
        "startingheight" : 1180,
        "banscore" : 0,
        "synced_headers" : 1180,
        "synced_blocks" : 1180,
        "inflight" : [
        ],
        "whitelisted" : false
    }
]
asked Oct 4, 2018 by AMARJEET

1 Answer

+1 vote
Depending on your networking setup, it is possible for there to be duplicate connections as nodes appear under more than one address. This will not have any adverse effects and does not need to worry you.
answered Oct 7, 2018 by MultiChain
So , at any given point of time how do I identify unique nodes ? how many and which are the unique nodes
You can look at the IP addresses in the "addr" objects.
...