Commit 17e79a0
committed
coinage-layer Phase 7 (part 16): delete_purse_safe — checks + delete composite
Composes the existing pre-flight guards with delete_purse for a
single-call safe deletion:
delete_purse_safe(p) -> Result<(), Error>
Returns (in this order):
- PurseHasInFlightOperations — if has_op_targeting_purse(p)
- InsufficientFunds — if check_has_live_coin_in(p)
- Then anything delete_purse itself can return.
Sharp Ok postcondition: the purse exists, isn't MAIN_PURSE, has no
live coins, and no op targets it. Verus discharges the implication
from the pre-flight guards' sharp postconditions composed with
delete_purse's existing contract.
209 verified, 0 errors.1 parent 52a84d6 commit 17e79a0
1 file changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1309 | 1347 | | |
1310 | 1348 | | |
1311 | 1349 | | |
| |||
0 commit comments