Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix bug in state group storage #2649

Merged
merged 4 commits into from
Nov 8, 2017
Merged

Fix bug in state group storage #2649

merged 4 commits into from
Nov 8, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 7, 2017

Fix a bug where the deltas stored for a state group were incorrect.

(See the individual commits: a couple of refactors before the actual change)

this is internal to statestore, so let's keep it there.
This is duplicated, so let's factor it out before fixing it
Fixes a bug where the persisted state groups were different to those actually
being used after auth resolution.
@richvdh richvdh force-pushed the rav/fix_delta_on_state_res branch from 97b8ef7 to 780dbb3 Compare November 7, 2017 16:43
this will not be included in the current_state in the context.
"""
state_updates = {
k: a.event_id for k, a in auth_events.items()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.iteritems() would be nice

context.delta_ids.update(state_updates)
context.prev_state_ids = dict(context.prev_state_ids)
context.prev_state_ids.update({
k: a.event_id for k, a in auth_events.items()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@richvdh richvdh merged commit 02a9a93 into develop Nov 8, 2017
@richvdh richvdh deleted the rav/fix_delta_on_state_res branch November 9, 2017 21:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants