test: add partial_settle dual-caller and snapshot-capture coverage#2
Open
tebney wants to merge 1 commit into
Open
test: add partial_settle dual-caller and snapshot-capture coverage#2tebney wants to merge 1 commit into
tebney wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes Liquifact#408.
Adds the missing
partial_settletest scenarios required by the issue:test_partial_settle_snapshot_not_overwrittentest_partial_settle_investor_payout_via_snapshotcompute_investor_payoutproduces correct pro-rata payout using the early snapshot afterpartial_settle+settletest_partial_settle_auth_requiredrequire_auth()is enforced — verified viamock_auths(&[])The following tests were already present and provide the remaining coverage:
test_partial_settle_sme_happy_path)test_partial_settle_admin_happy_path)test_partial_settle_unauthorized_caller_panics)test_partial_settle_blocked_by_legal_hold)test_partial_settle_rejected_if_not_open)test_partial_settle_writes_correct_snapshot)test_funding_blocked_after_partial_settle)Docs
docs/escrow-snapshot.md— addedpartial_settle and Early Snapshot Capturesection cross-linking all 9 test scenarios and documenting the write-once guarantee.Security notes
partial_settle(require_auth()+ address check).if !has(FundingCloseSnapshot)guard plus thestatus == 0pre-condition together make overwrite impossible.