summary refs log tree commit diff
path: root/changelog.d/10615.misc
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-08-18 12:36:22 +0100
committerGitHub <noreply@github.com>2021-08-18 12:36:22 +0100
commit964f29cb6f4ff5892575ac170aa872822f2c1a0e (patch)
treef8e5b44e9bc9a5f8be41b65d999fd67038266461 /changelog.d/10615.misc
parentUse auto-attribs for attrs classes for sync. (#10630) (diff)
downloadsynapse-964f29cb6f4ff5892575ac170aa872822f2c1a0e.tar.xz
Refactor `on_receive_pdu` code (#10615)
* drop room pdu linearizer sooner

No point holding onto it while we recheck the db

* move out `missing_prevs` calculation

we're going to need `missing_prevs` whatever we do, so we may as well calculate
it eagerly and just update it if it gets outdated.

* Add another `if missing_prevs` condition

this should be a no-op, since all the code inside the block already checks `if
missing_prevs`

* reorder if conditions

This shouldn't change the logic at all.

* Push down `min_depth` read

No point reading it from the database unless we're going to use it.

* Collect the sent_to_us_directly code together

Move the remaining `sent_to_us_directly` code inside the `if
sent_to_us_directly` block.

* Properly separate the `not sent_to_us_directly` branch

Since the only way this second block is now reachable is if we
*didn't* go into the `sent_to_us_directly` branch, we can replace it with a
simple `else`.

* changelog
Diffstat (limited to 'changelog.d/10615.misc')
-rw-r--r--changelog.d/10615.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/10615.misc b/changelog.d/10615.misc
new file mode 100644
index 0000000000..9a765435db
--- /dev/null
+++ b/changelog.d/10615.misc
@@ -0,0 +1 @@
+Clean up some of the federation event authentication code for clarity.