Description
Extend contracts/invoice/tests/invoice_id_boundary_test.rs to set InvoiceCount manually to u64::MAX - 1 and verify that creating one more invoice succeeds (ID = u64::MAX) and the next creation returns an overflow error rather than wrapping to 0.
Requirements and context
The current boundary tests exist but may not cover the exact u64::MAX wrap scenario. Preventing ID wrap-around protects against a critical storage collision where a new invoice overwrites invoice #1's data.
Suggested execution
Fork the repo and create a branch:
git checkout -b test/invoice-id-u64max-wrap
Update invoice_id_boundary_test.rs with a direct storage manipulation to set the count near max.
Test and commit
test(invoice): add u64::MAX invoice ID boundary and wrap-around test
Guidelines
Assignment required before starting. PR description must include: Closes #[issue_id]
Description
Extend
contracts/invoice/tests/invoice_id_boundary_test.rsto setInvoiceCountmanually tou64::MAX - 1and verify that creating one more invoice succeeds (ID = u64::MAX) and the next creation returns an overflow error rather than wrapping to 0.Requirements and context
The current boundary tests exist but may not cover the exact
u64::MAXwrap scenario. Preventing ID wrap-around protects against a critical storage collision where a new invoice overwrites invoice #1's data.Suggested execution
Fork the repo and create a branch:
Update
invoice_id_boundary_test.rswith a direct storage manipulation to set the count near max.Test and commit
Guidelines
Assignment required before starting. PR description must include:
Closes #[issue_id]