diff --git a/src/containers/consignment.rs b/src/containers/consignment.rs index 3d149f3c..03cf2f13 100644 --- a/src/containers/consignment.rs +++ b/src/containers/consignment.rs @@ -383,6 +383,8 @@ impl Consignment { } // TODO: check attach ids from data containers are present in operations // TODO: validate sigs and remove untrusted + // TODO: Check that all extensions present in the consignment are used by state + // transitions if validity != Validity::Valid { Err((status, self)) diff --git a/src/persistence/state.rs b/src/persistence/state.rs index a77cc30d..319fe8d6 100644 --- a/src/persistence/state.rs +++ b/src/persistence/state.rs @@ -178,8 +178,7 @@ impl State

{ if input.prev_out.op == *id { *used = true; if let Some((_, witness_ord2)) = ordered_extensions.get_mut(id) { - // TODO: Double-check this ordering - if *witness_ord2 > witness_ord { + if *witness_ord2 < witness_ord { *witness_ord2 = witness_ord; } } else { @@ -197,7 +196,9 @@ impl State

{ .add_extension(extension, *witness_id, *witness_ord) .map_err(StateError::WriteProvider)?; } - // TODO: Do something otherwise + // Otherwise consignment includes state extensions which are not + // used in transaction graph. This must not be the case for the + // validated consignments. } Ok(())