Files: settlement_contract/src/lib.rs:278-301
Problem: If pause() is called when the contract is already paused, it writes true to storage (same value) and emits a pause event. This produces a misleading event stream showing two consecutive pause events with no intervening unpause. Off-chain indexers may misinterpret this as a double-pause or missed unpause.
Fix: Add a redundant-pause guard (see Issue 10). Emit a warning or explicitly document in the event docstring that duplicate pause events should be ignored by indexers if the guard is not added.
Files:
settlement_contract/src/lib.rs:278-301Problem: If
pause()is called when the contract is already paused, it writestrueto storage (same value) and emits apauseevent. This produces a misleading event stream showing two consecutivepauseevents with no interveningunpause. Off-chain indexers may misinterpret this as a double-pause or missed unpause.Fix: Add a redundant-pause guard (see Issue 10). Emit a warning or explicitly document in the event docstring that duplicate
pauseevents should be ignored by indexers if the guard is not added.