summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-06-25 15:38:47 +0100
committerErik Johnston <erik@matrix.org>2020-06-25 15:38:47 +0100
commita58953f4649cd4b52f773b3bb06aa8e338258436 (patch)
treeacae7e81db14cca32ff5a0b47f52a0f498faf712
parentAdd some extra debug logging to state res (diff)
downloadsynapse-github/erikj/log_state_v2.tar.xz
-rw-r--r--synapse/state/v2.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/state/v2.py b/synapse/state/v2.py
index 6c9b8f6a6d..5b20b88529 100644
--- a/synapse/state/v2.py
+++ b/synapse/state/v2.py
@@ -138,6 +138,8 @@ def resolve_events_with_store(
     )
 
     logger.debug("resolved power events")
+    for s in resolved_state.items():
+        logger.debug("resolved power state: %s", s)
 
     # OK, so we've now resolved the power events. Now sort the remaining
     # events using the mainline of the resolved power level.
@@ -442,9 +444,11 @@ def _iterative_auth_checks(
                 do_sig_check=False,
                 do_size_check=False,
             )
+            logger.debug("Authing event: %s success", event_id)
 
             resolved_state[(event.type, event.state_key)] = event_id
-        except AuthError:
+        except AuthError as e:
+            logger.debug("Authing event: %s failed: %s", event_id, e)
             pass
 
     return resolved_state
@@ -518,7 +522,7 @@ def _mainline_sort(
     event_ids.sort(key=lambda ev_id: order_map[ev_id])
 
     for event_id in event_ids:
-        logger.debug("Event %s has mainline %d", event_id, order_map[event_id])
+        logger.debug("Event %s has mainline %d", event_id, order_map[event_id][0])
 
     return event_ids