Merge branch 'protocol' into testing

This commit is contained in:
Lee Miller 2025-02-18 03:58:42 +02:00
commit 25cb745f05
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
2 changed files with 3 additions and 1 deletions

View File

@ -417,6 +417,8 @@ class ConnectionBase(threading.Thread):
addr = message.Addr.from_message(m)
logging.debug('%s:%s -> %s', self.host_print, self.port, addr)
for a in addr.addresses:
if not a.host or a.port == 0:
continue
if (a.host, a.port) not in shared.core_nodes:
shared.unchecked_node_pool.add((a.host, a.port))

View File

@ -228,7 +228,7 @@ class NetAddr(IStructure):
def to_bytes(self):
b = b''
b += struct.pack('>Q', int(time.time()))
b += struct.pack('>Q', int(time.time() - 5400))
b += struct.pack('>I', self.stream)
b += NetAddrNoPrefix(self.services, self.host, self.port).to_bytes()
return b