mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 07:50:05 +00:00
Remove unncessary call in _get_missing_events_for_pdu
This commit is contained in:
parent
3a9f5bf6dd
commit
9b147cd730
1 changed files with 11 additions and 13 deletions
|
@ -177,6 +177,17 @@ class FederationHandler(BaseHandler):
|
||||||
have_seen = yield self.store.have_events(
|
have_seen = yield self.store.have_events(
|
||||||
[ev for ev, _ in pdu.prev_events]
|
[ev for ev, _ in pdu.prev_events]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
seen = set(have_seen.keys())
|
||||||
|
if prevs - seen:
|
||||||
|
logger.info(
|
||||||
|
"Still missing %d prev events for %s: %r...",
|
||||||
|
len(prevs - seen), pdu.event_id, list(prevs - seen)[:5]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
logger.info(
|
||||||
|
"Found all missing prev events for %s", pdu.event_id
|
||||||
|
)
|
||||||
elif prevs - seen:
|
elif prevs - seen:
|
||||||
logger.info(
|
logger.info(
|
||||||
"Not fetching %d missing events for room %r,event %s: %r...",
|
"Not fetching %d missing events for room %r,event %s: %r...",
|
||||||
|
@ -294,19 +305,6 @@ class FederationHandler(BaseHandler):
|
||||||
get_missing=False
|
get_missing=False
|
||||||
)
|
)
|
||||||
|
|
||||||
have_seen = yield self.store.have_events(
|
|
||||||
[ev for ev, _ in pdu.prev_events]
|
|
||||||
)
|
|
||||||
seen = set(have_seen.keys())
|
|
||||||
if prevs - seen:
|
|
||||||
logger.info(
|
|
||||||
"Still missing %d prev events for %s: %r...",
|
|
||||||
len(prevs - seen), pdu.event_id, list(prevs - seen)[:5]
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
logger.info("Found all missing prev events for %s", pdu.event_id)
|
|
||||||
defer.returnValue(have_seen)
|
|
||||||
|
|
||||||
@log_function
|
@log_function
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _process_received_pdu(self, origin, pdu, state, auth_chain):
|
def _process_received_pdu(self, origin, pdu, state, auth_chain):
|
||||||
|
|
Loading…
Reference in a new issue