Skip to main content

validate_app_data_update_sequence

Function validate_app_data_update_sequence 

Source
pub fn validate_app_data_update_sequence<'a>(
    updates: impl IntoIterator<Item = AppDataUpdateInCommit<'a>>,
    committed: impl Fn(ComponentId) -> Option<Vec<u8>>,
    registry: &ComponentRegistry,
    dm_members: Option<&DmMembers<String>>,
    membership: Option<&HashSet<InboxId>>,
) -> Result<HashMap<ComponentId, Option<Vec<u8>>>, CommitRuleError>
Expand description

Validate a commit’s AppDataUpdate proposals in order and return each touched component’s state after the last of them (None once removed).

Each proposal is judged against its component’s state after the preceding proposals, starting from committed, so neither a transition invariant nor an immutable first write can be split across proposals.