Skip to content

Commit 18dd2a7

Browse files
committed
version pair weight reset events
1 parent 79070e4 commit 18dd2a7

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

contracts/ledgerlens-score/src/event_emission.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ mod test_event_schema {
4747
///
4848
/// `test_all_events_carry_schema_version` above never catches this
4949
/// because it never triggers `bulk_reset_pair_weight` (the only caller of
50-
/// `pair_weight_reset`). This test does, and is expected to FAIL against
51-
/// the current `pair_weight_reset` implementation — see the invariants
52-
/// doc for why the fix itself is deliberately not included in the same
53-
/// change (it alters the event's topic shape, which is an ABI-level
54-
/// change requiring the notice process in
55-
/// docs/interface-versioning-policy.md).
50+
/// `pair_weight_reset`). This test triggers that path and pins the
51+
/// corrected versioned topic shape so future changes cannot silently
52+
/// break indexers.
5653
#[test]
5754
fn test_pair_weight_reset_carries_schema_version() {
5855
let env = Env::default();

contracts/ledgerlens-score/src/events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn pair_weight_updated(env: &Env, asset_pair: &Symbol, weight: u32) {
2929
}
3030

3131
pub fn pair_weight_reset(env: &Env, asset_pair: &Symbol) {
32-
env.events().publish((symbol_short!("pw_rst"), asset_pair.clone()), ());
32+
env.events().publish((symbol_short!("pw_rst"), EVENT_VERSION, asset_pair.clone()), ());
3333
}
3434

3535
/// Emitted when the admin assigns an asset pair to a policy class via

0 commit comments

Comments
 (0)