diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 4f74814aea..ba83d4fd26 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -287,7 +287,9 @@ class FederationHandler: # as they're more likely to reveal history that we can return (something # absolutely in the past is better than something can potentially extend # into the past). - 1 if current_depth >= e.depth else 0, + # + # This sorts ascending so 0 sorts before 1 + 0 if current_depth >= e.depth else 1, ), )