Tier: Easy
Description: force_cancel_shipment (lib.rs:4340-4356) validates its reason hash via the generic validation::validate_hash(), which returns InvalidHash for an all-zero hash — never the dedicated variant. Compare resolve_dispute (lib.rs:4882-4885), which has an inline comment explaining it uses a specific error rather than the generic one, and correctly returns DisputeReasonHashMissing.
Files: contracts/shipment/src/errors.rs:84, contracts/shipment/src/error_map.rs:249, 540, contracts/shipment/src/lib.rs:4340-4356
Tasks:
Tier: Easy
Description:
force_cancel_shipment(lib.rs:4340-4356) validates its reason hash via the genericvalidation::validate_hash(), which returnsInvalidHashfor an all-zero hash — never the dedicated variant. Compareresolve_dispute(lib.rs:4882-4885), which has an inline comment explaining it uses a specific error rather than the generic one, and correctly returnsDisputeReasonHashMissing.Files:
contracts/shipment/src/errors.rs:84,contracts/shipment/src/error_map.rs:249, 540,contracts/shipment/src/lib.rs:4340-4356Tasks:
force_cancel_shipmentreturnForceCancelReasonHashMissingfor a missing/zero reason hash, following theresolve_disputepatternAcceptance Criteria:
ForceCancelReasonHashMissingis actually returned by the code path it was designed for