Skip to content

[CT-80] ownership_chain module has no test for a broken or circular chain #1204

Description

@mftee

Overview

contract/src/module/ownership_chain/mod.rs (212 lines) presumably builds the transfer history for a document, but has no evident test for a malformed chain — e.g. a transfer record pointing to a previous-owner entry that doesn't exist, or (in a corrupted-data scenario) a cycle — which should be detected rather than causing an infinite loop or silent truncation.

Tasks

  • Add validation that detects a broken link (missing previous-owner reference) or a cycle when building the chain
  • Add a test constructing a deliberately broken chain and asserting it's detected rather than looping or truncating silently

Acceptance Criteria

  • Building an ownership chain over corrupted/circular data returns a clear error instead of hanging or truncating silently

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontract

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions