Skip to content

Commit

Permalink
Merge branch 'fix/validation-script'
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 18, 2023
2 parents eb18540 + a4c1c4a commit ce4bccb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/schema/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use super::{ExtensionType, GlobalStateType, Occurrences, TransitionType};
use crate::LIB_NAME_RGB;

// Here we can use usize since encoding/decoding makes sure that it's u16
// TODO: Do custom types
pub type AssignmentType = u16;
pub type ValencyType = u16;
pub type GlobalSchema = TinyOrdMap<GlobalStateType, Occurrences>;
Expand Down
1 change: 1 addition & 0 deletions src/schema/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub trait SchemaTypeIndex:
}
impl SchemaTypeIndex for u16 {}

// TODO: Do custom types
pub type GlobalStateType = u16;
pub type ExtensionType = u16;
pub type TransitionType = u16;
Expand Down
2 changes: 1 addition & 1 deletion src/validation/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<'consignment, 'resolver, C: ConsignmentApi, R: ResolveTx>
expected: self.schema_id,
actual: schema.schema_id(),
});
// Unlike other failures, here we return immediatelly, since there is no point
// Unlike other failures, here we return immediately, since there is no point
// to validate all consignment data against an invalid schema: it will result in
// a plenty of meaningless errors
return;
Expand Down
2 changes: 1 addition & 1 deletion src/vm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<'script> AluRuntime<'script> {
.copied()
.collect::<BTreeSet<_>>();
for ty in used_state {
self.run(EntryPoint::ValidateGlobalState(ty), &regs, info)?;
self.run(EntryPoint::ValidateOwnedState(ty), &regs, info)?;
}

Ok(())
Expand Down

0 comments on commit ce4bccb

Please sign in to comment.