Add self peers with rating 1

This commit is contained in:
Dmitri Bogomolov 2019-08-02 17:56:40 +03:00
parent 92c0196887
commit a7a634be1b
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -98,7 +98,7 @@ def saveKnownNodes(dirName=None):
def addKnownNode(stream, peer, lastseen=None, is_self=False):
knownNodes[stream][peer] = {
"lastseen": lastseen or time.time(),
"rating": 0,
"rating": 1 if is_self else 0,
"self": is_self,
}