summary refs log tree commit diff
path: root/synapse/federation/units.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-03 17:51:42 +0000
committerErik Johnston <erik@matrix.org>2014-11-03 17:51:42 +0000
commit68698e0ac8c39083f6ab7d377a48b5bead3d3598 (patch)
treed2b722e1743d024cf8dcece32f0b8c07fb1bcf0e /synapse/federation/units.py
parentMerge branch 'event_signing' of github.com:matrix-org/synapse into federation... (diff)
downloadsynapse-68698e0ac8c39083f6ab7d377a48b5bead3d3598.tar.xz
Fix bugs in generating event signatures and hashing
Diffstat (limited to '')
-rw-r--r--synapse/federation/units.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/synapse/federation/units.py b/synapse/federation/units.py
index c94dcf64cf..c2d8dca8f3 100644
--- a/synapse/federation/units.py
+++ b/synapse/federation/units.py
@@ -65,8 +65,7 @@ class Pdu(JsonEncodedObject):
         "content",
         "outlier",
         "hashes",
-        "signatures",
-        "is_state",  # Below this are keys valid only for State Pdus.
+        "signatures",  # Below this are keys valid only for State Pdus.
         "state_key",
         "prev_state",
         "required_power_level",
@@ -91,16 +90,10 @@ class Pdu(JsonEncodedObject):
     # TODO: We need to make this properly load content rather than
     # just leaving it as a dict. (OR DO WE?!)
 
-    def __init__(self, destinations=[], is_state=False, prev_events=[],
+    def __init__(self, destinations=[], prev_events=[],
                  outlier=False, hashes={}, signatures={}, **kwargs):
-        if is_state:
-            for required_key in ["state_key"]:
-                if required_key not in kwargs:
-                    raise RuntimeError("Key %s is required" % required_key)
-
         super(Pdu, self).__init__(
             destinations=destinations,
-            is_state=bool(is_state),
             prev_events=prev_events,
             outlier=outlier,
             hashes=hashes,