Problem
contracts/streaming/src/test_features.rs (lines 437-610) calls client.partial_cancel(...) extensively, and PartialCancelEvent is fully defined in lib.rs:265-271. However, there is no partial_cancel function anywhere in impl StreamingContract.
This only "works" today because test_features.rs is excluded from the module tree (see the companion issue about that) — if it were included, the crate wouldn't compile.
Impact
Either a shipped feature was silently removed from the contract while its tests/event type were left behind, or a promised feature (partial cancellation of a stream) was never actually finished. Either way, the codebase currently documents/tests a capability that doesn't exist, which is confusing for integrators reading the event types and misleading for anyone trusting the (currently-skipped) test suite.
Suggested fix
Decide whether partial_cancel is in scope:
- If yes: implement
partial_cancel in impl StreamingContract (allow the sender to cancel and reclaim only part of the undeposited/unlocked amount, emitting PartialCancelEvent), matching the behavior the tests in test_features.rs expect.
- If no: remove
PartialCancelEvent and the corresponding tests to avoid dead/misleading code.
Location
contracts/streaming/src/test_features.rs:437-610
contracts/streaming/src/lib.rs:265-271 (PartialCancelEvent)
Problem
contracts/streaming/src/test_features.rs(lines 437-610) callsclient.partial_cancel(...)extensively, andPartialCancelEventis fully defined inlib.rs:265-271. However, there is nopartial_cancelfunction anywhere inimpl StreamingContract.This only "works" today because
test_features.rsis excluded from the module tree (see the companion issue about that) — if it were included, the crate wouldn't compile.Impact
Either a shipped feature was silently removed from the contract while its tests/event type were left behind, or a promised feature (partial cancellation of a stream) was never actually finished. Either way, the codebase currently documents/tests a capability that doesn't exist, which is confusing for integrators reading the event types and misleading for anyone trusting the (currently-skipped) test suite.
Suggested fix
Decide whether
partial_cancelis in scope:partial_cancelinimpl StreamingContract(allow the sender to cancel and reclaim only part of the undeposited/unlocked amount, emittingPartialCancelEvent), matching the behavior the tests intest_features.rsexpect.PartialCancelEventand the corresponding tests to avoid dead/misleading code.Location
contracts/streaming/src/test_features.rs:437-610contracts/streaming/src/lib.rs:265-271(PartialCancelEvent)