Skip to content

Commit

Permalink
check attach id
Browse files Browse the repository at this point in the history
  • Loading branch information
jack committed Jun 20, 2024
1 parent d2f99cf commit 1c2148c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/containers/consignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,25 @@ impl<const TRANSFER: bool> Consignment<TRANSFER> {
)));
}
}

for bundle in self.bundles.iter() {
for transition_bundle in bundle.bundles() {
for transition in transition_bundle.known_transitions.values() {
for assign in transition.assignments.values() {
assign.as_attachment()
.iter()
.for_each(|item| {
let state = item.as_revealed_state().unwrap();
if !self.attachments.keys().any(|&id| id == state.id ) {
status.add_warning(Warning::Custom(format!(
"attach id {:?} is not present in the consignment"
, state.id)));
}
})
}
}
}
}
// TODO: check attach ids from data containers are present in operations
// TODO: validate sigs and remove untrusted

Expand Down

0 comments on commit 1c2148c

Please sign in to comment.