registry/refusal

How the state validator reports a refusal, and the refusal reasons that more than one registry owner constructs.

Responsibility

A named refusal — one the Modify decision or the custody spending path gives a reason for — is one user-defined trace followed by False, never a crash: a script that dies inside a library cannot say why. traceFalse is that report. It covers only those paths: genesis, the unmatched arms of the validator and the expects of the Modify decision (a malformed continuation, an invalid proof no named refusal covers) still crash. depositReturned and refundShort are the one construction site of the reasons deposit-returned and refund for every registry owner that emits them, so a test asserting either reason asserts the value the validator traces.

Dependencies

Imports nothing from this project. state, registry/discharge, registry/settlement and registry/modify import it; it imports none of them, so it sits at the bottom of the registry’s dependency order.

Assumptions

Invariants

Functions

traceFalse(reason: String) -> Bool

Report a refusal: trace reason once and answer False. A refused Modify in the spend handler and every refusal of the custody spending path answer through here, so exactly one user-defined trace names why.

depositReturned() -> Option<String>

A payment the fold owes a payee is short, misdirected or missing.

refundShort() -> Option<String>

A custody refund is not paid to the address its custody recorded.

Search Document