Try to hotfix request_peers.

This commit is contained in:
Florin Chirica 2020-09-13 23:40:38 +03:00 committed by Gene Hoffman
parent 7fc9664a22
commit 73a4cf501f

View File

@ -55,7 +55,7 @@ from src.util.hash import std_hash
from src.util.ints import uint32, uint64, uint128
from src.util.merkle_set import MerkleSet
from src.util.path import mkdir, path_from_root
from src.types.peer_info import PeerInfo
from src.types.peer_info import PeerInfo, TimestampedPeerInfo
OutboundMessageGenerator = AsyncGenerator[OutboundMessage, None]
@ -1746,7 +1746,11 @@ class FullNode:
) -> OutboundMessageGenerator:
if self.global_connections is None:
return
connected_peers = self.global_connections.get_full_node_peerinfos()
tmp_connected_peers = self.global_connections.get_full_node_peerinfos()
connected_peers = [
TimestampedPeerInfo(peer.host, peer.port, uint64(0))
for peer in tmp_connected_peers
]
unconnected_peers = self.global_connections.peers.get_peers(
recent_threshold=24 * 60 * 60
)