We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fe7f99 commit 8f28a78Copy full SHA for 8f28a78
1 file changed
src/libs/consensus/v2/routines/getShard.ts
@@ -15,7 +15,7 @@ export default async function getShard(seed: string): Promise<Peer[]> {
15
// ! we need to get the peers from the last 3 blocks too
16
const allPeers = await PeerManager.getInstance().getOnlinePeers()
17
const peers = allPeers.filter(
18
- peer => peer.status.online && peer.sync.status,
+ peer => peer.status.online && peer.sync.status && Math.abs(peer.sync.block - getSharedState.lastBlockNumber) <= 1,
19
)
20
21
// Select up to 10 peers from the list using the seed as a source of randomness
0 commit comments