Less timestamp penalty for inbound connections

- was over 2 days, but PyBM will only spread those with more recent than
  3 hours. So it's now set to 2 hours
This commit is contained in:
Peter Šurda 2017-02-22 16:18:08 +01:00
parent d7076626c2
commit a6dbb1e37e
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -796,7 +796,7 @@ class receiveDataThread(threading.Thread):
for stream in self.remoteStreams:
knownnodes.knownNodes[stream][state.Peer(self.peer.host, self.remoteNodeIncomingPort)] = int(time.time())
if not self.initiatedConnection:
knownnodes.knownNodes[stream][state.Peer(self.peer.host, self.remoteNodeIncomingPort)] -= 162000 # penalise inbound, 2 days minus 3 hours
knownnodes.knownNodes[stream][state.Peer(self.peer.host, self.remoteNodeIncomingPort)] -= 7200 # penalise inbound, 2 hours
shared.needToWriteKnownNodesToDisk = True
self.sendverack()