Skip to content

test: add adversarial accept_issuer_transfer coverage (#1059) - #1282

Closed
ASIDISG wants to merge 2 commits into
RevoraOrg:masterfrom
ASIDISG:test/1059-accept-issuer-transfer
Closed

ASIDISG wants to merge 2 commits into
RevoraOrg:masterfrom
ASIDISG:test/1059-accept-issuer-transfer

Conversation

@ASIDISG

@ASIDISG ASIDISG commented Sep 28, 2026 •

Copy link
Copy Markdown

Summary

Adds src/test_accept_issuer_transfer.rs, an adversarial suite for accept_issuer_transfer.

Axis Cases
Success the offering moves to the new issuer, the pending entry is consumed and the payload event is emitted; per-issuer rounding-mode config migrates to the new issuer key; a self-accept consumes the pending without moving the offering
Typed rejections no pending, accept after cancel, accept after reject and an uninvolved address are NoTransferPending (the pending survives the uninvolved attempt); a duplicate target offering is LimitReached with the pending preserved; ContractFrozen; ContractPaused (and works after unpause)
Expiry boundaries accept at exactly the default window succeeds, one second past is IssuerTransferExpired with the pending preserved; a custom window expires past itself even while the default window would still be open
Isolation a pending proposal is bound to its own offering identity

Authorization note: accept_issuer_transfer calls new_issuer.require_auth() first; a host auth failure is a non-unwinding panic that try_* cannot capture (the same limitation documented in test_auth.rs), so wrong-identity rejection is covered through the typed paths above.

Closes #1059

Independence and verification

cargo test --lib test_accept_issuer_transfer::
test result: ok. 15 passed; 0 failed

and with all four test branches merged together: 53 passed, 0 failed.

Not claimed

The earlier version of this PR stacked on the other three and quoted "307 passed" from a different base. Those numbers are gone; the figures above are what this branch produces.

ASIDISG added a commit to ASIDISG/Revora-Contracts that referenced this pull request Sep 28, 2026
Fixes the CI / Format check (cargo fmt) gate on PR RevoraOrg#1282 and re-stacks
the branch onto the formatted RevoraOrg#1058 tip.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@ASIDISG
ASIDISG force-pushed the test/1059-accept-issuer-transfer branch from 850a051 to 4d40ee8 Compare September 28, 2026 14:21
ASIDISG added a commit to ASIDISG/Revora-Contracts that referenced this pull request Sep 29, 2026
Fixes the CI / Format check (cargo fmt) gate on PR RevoraOrg#1282 and re-stacks
the branch onto the formatted RevoraOrg#1058 tip.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>

(cherry picked from commit 4d40ee8)
@ASIDISG
ASIDISG force-pushed the test/1059-accept-issuer-transfer branch 3 times, most recently from ad33a77 to f704141 Compare September 29, 2026 16:52
Brings master in line with the repository's own Format check (cargo fmt --all -- --check), which fails on master today (40 hunks). Formatting only; no code or test changes.
New module src/test_accept_issuer_transfer.rs and its mod declaration. Closes RevoraOrg#1059.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add adversarial coverage for accept_issuer_transfer in lib

2 participants