v0.1.0-pre.011-fix-01

This commit is contained in:
2026-07-24 15:06:27 +02:00
parent 42e8a203ec
commit 60660ca555
161 changed files with 10665 additions and 977 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/materializer/token/accounts.rs
// version: 2
// version: 3
//! Stable committed SPL Token mutation and ATA lifecycle projections.
@@ -395,7 +395,7 @@ fn account_key_for_role(accounts: &serde_json::Value, role: &str) -> serde_json:
}
/// Materialize one already parsed Token-2022 account snapshot without inferring hidden state.
pub fn materialize_token2022_state_snapshot(
pub fn materializer_token_materialize_token2022_state_snapshot(
account_key: &str,
slot: u64,
state: &crate::DcToken2022State,
@@ -801,7 +801,9 @@ mod tests {
},
],
};
let output = match crate::materialize_token2022_state_snapshot("mint111", 99, &state) {
let output = match crate::materializer_token_materialize_token2022_state_snapshot(
"mint111", 99, &state,
) {
std::result::Result::Ok(value) => value,
std::result::Result::Err(error) => panic!("snapshot failed: {error}"),
};
@@ -823,9 +825,13 @@ mod tests {
account_type: std::option::Option::None,
extensions: std::vec::Vec::new(),
};
let first = crate::materialize_token2022_state_snapshot("account111", 7, &state);
let second = crate::materialize_token2022_state_snapshot("account111", 7, &state);
let first =
crate::materializer_token_materialize_token2022_state_snapshot("account111", 7, &state);
let second =
crate::materializer_token_materialize_token2022_state_snapshot("account111", 7, &state);
assert_eq!(first, second);
assert!(crate::materialize_token2022_state_snapshot("", 7, &state).is_err());
assert!(
crate::materializer_token_materialize_token2022_state_snapshot("", 7, &state).is_err()
);
}
}