Follow-up from PR #740.
Code:
|
/// Check if a template ID matches a given suffix at a module boundary. |
|
/// Requires the suffix to be preceded by `:` (package separator) or match exactly. |
|
/// |
|
/// TODO(test): every event gets filtered through this — a bug means events are |
|
/// silently ignored. Test exact match ("Signer:Signer"), prefix match |
|
/// ("abc123:Signer:Signer"), and near-misses ("FakeSigner:Signer", |
|
/// "Signer:SignerExtra"). |
|
pub fn template_suffix_matches(template_id: &str, suffix: &str) -> bool { |
Context: every Canton event filter depends on template_suffix_matches. Add tests for exact match (Signer:Signer), package-prefixed match (abc123:Signer:Signer), and near-misses like FakeSigner:Signer and Signer:SignerExtra so malformed template IDs are not silently accepted or valid events ignored.
Follow-up from PR #740.
Code:
mpc/chain-signatures/node/src/indexer_canton/ledger_api.rs
Lines 373 to 380 in 93c8e00
Context: every Canton event filter depends on
template_suffix_matches. Add tests for exact match (Signer:Signer), package-prefixed match (abc123:Signer:Signer), and near-misses likeFakeSigner:SignerandSigner:SignerExtraso malformed template IDs are not silently accepted or valid events ignored.