Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -738,14 +738,15 @@ mod tests {
min_value: None,
max_value: None,
};
let v14 = PlatformVersion::get(14).expect("v14 must exist");
let latest = PlatformVersion::latest();
assert_eq!(
v14.dpp
latest
.dpp
.token_versions
.distribution_function_evaluate_version,
1
);
assert_eq!(distribution.evaluate(0, 1, v14).unwrap(), 31_402);
assert_eq!(distribution.evaluate(0, 1, latest).unwrap(), 31_402);
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fn should_repair_legacy_keep_history_delete_flag_at_protocol_14() {
let repaired = parse_at_version(repair_schema(true, false), 14, true).unwrap();
let result = old
.as_ref()
.validate_update(repaired.as_ref(), 2, PlatformVersion::get(14).unwrap())
.validate_update(repaired.as_ref(), 2, PlatformVersion::latest())
.expect("repair must reach a consensus result");
assert!(result.is_valid(), "repair rejected: {:?}", result.errors);
}
Expand Down Expand Up @@ -276,7 +276,7 @@ fn should_reject_other_delete_and_history_flag_changes_at_protocol_14() {
let new = parse_at_version(repair_schema(new_flags.0, new_flags.1), 14, false).unwrap();
let result = old
.as_ref()
.validate_update(new.as_ref(), 2, PlatformVersion::get(14).unwrap())
.validate_update(new.as_ref(), 2, PlatformVersion::latest())
.unwrap();
assert!(
!result.is_valid(),
Expand Down Expand Up @@ -304,7 +304,7 @@ fn should_reject_incompatible_properties_during_keep_history_repair() {
.unwrap();
let result = old
.as_ref()
.validate_update(new.as_ref(), 2, PlatformVersion::get(14).unwrap())
.validate_update(new.as_ref(), 2, PlatformVersion::latest())
.unwrap();
assert!(
!result.is_valid(),
Expand All @@ -320,7 +320,7 @@ fn should_reject_mutability_change_during_keep_history_repair() {
let new = parse_at_version(schema, 14, true).unwrap();
let result = old
.as_ref()
.validate_update(new.as_ref(), 2, PlatformVersion::get(14).unwrap())
.validate_update(new.as_ref(), 2, PlatformVersion::latest())
.unwrap();
assert!(
!result.is_valid(),
Expand Down Expand Up @@ -353,7 +353,7 @@ fn should_still_validate_property_named_can_be_deleted_during_keep_history_repai
let new = parse_at_version(new_schema, 14, true).unwrap();
let result = old
.as_ref()
.validate_update(new.as_ref(), 2, PlatformVersion::get(14).unwrap())
.validate_update(new.as_ref(), 2, PlatformVersion::latest())
.unwrap();
assert!(
!result.is_valid(),
Expand Down
Loading
Loading