Skip to content

Commit edb8c20

Browse files
committed
fix: use strict latest version.
1 parent ae60fc5 commit edb8c20

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

checks/executor/citeria/global-storage-includes/src/lib.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,23 @@ impl Criterionish for GlobalStorageIncludes {
8888
}
8989
}
9090
None => {
91-
return Err(CriterionError::Internal(
92-
"movement state value is unexpectedly None".into(),
93-
));
91+
debug!("Value from a previous version has been removed at the latest ledger version");
92+
93+
match maptos_state_view
94+
.get_state_value(&movement_aptos_state_key)
95+
.map_err(|e| CriterionError::Internal(e.into()))?
96+
{
97+
Some(_) => {
98+
return Err(CriterionError::Unsatisfied(
99+
format!(
100+
"Movement Aptos is unexpectedly not missing a value for {:?}",
101+
movement_state_key
102+
)
103+
.into(),
104+
));
105+
}
106+
None => {}
107+
}
94108
}
95109
}
96110
count += 1;

checks/executor/citeria/global-storage-injective/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rust-version = { workspace = true }
1111
[dependencies]
1212
migration-executor-test-types = { workspace = true }
1313
anyhow = { workspace = true }
14-
14+
tracing = { workspace = true }
1515

1616
[lints]
1717
workspace = true

checks/executor/citeria/global-storage-injective/src/lib.rs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use migration_executor_test_types::criterion::{
44
Criterion, CriterionError, Criterionish, MovementAptosExecutor, MovementExecutor,
55
};
66
use migration_executor_test_types::criterion::movement_aptos_executor::aptos_types::state_store::state_key::StateKey as MovementAptosStateKey;
7+
use tracing::debug;
78
pub struct GlobalStorageInjective;
89

910
impl GlobalStorageInjective {
@@ -70,13 +71,23 @@ impl Criterionish for GlobalStorageInjective {
7071
))?;
7172
}
7273
None => {
73-
return Err(CriterionError::Internal(
74-
format!(
75-
"Movement state value for {:?} is unexpectedly None",
76-
movement_state_key
77-
)
78-
.into(),
79-
));
74+
debug!("Value from a previous version has been removed at the latest ledger version");
75+
// check that it None for the maptos state view as well
76+
match maptos_state_view
77+
.get_state_value(&movement_aptos_state_key)
78+
.map_err(|e| CriterionError::Internal(e.into()))?
79+
{
80+
Some(_) => {
81+
return Err(CriterionError::Unsatisfied(
82+
format!(
83+
"Movement Aptos is unexpectedly not missing a value for {:?}",
84+
movement_state_key
85+
)
86+
.into(),
87+
));
88+
}
89+
None => {}
90+
}
8091
}
8192
}
8293
}

0 commit comments

Comments
 (0)