Commit 583bd6d
committed
test(drive-abci): expect UnpaidConsensusError for single-tx purchase failures (issue #2867)
Two pre-existing NFT tests asserted PaidConsensusError + invalid_paid_count=1
for single-transition batches whose lone Purchase fails on
DocumentNotForSaleError or DocumentIncorrectPurchasePriceError.
With the v1 `flatten` / `merge_many` aggregators introduced in this PR
(PROTOCOL_VERSION_12+), an all-failed single-transition batch now
returns `data: None` instead of the legacy `Some(empty_vec)`. The
result flows down the unpaid path: `UnpaidConsensusError` and the tx
is removed from the block by prepare_proposal. Update the assertions
to reflect that.
Note that PR #3608 (separate, pending) restores Paid behavior for
these specific paths by emitting a BumpIdentityDataContractNonce
action so the user pays for the validation work — at which point
these tests will need to flip back to PaidConsensusError. For now this
PR alone produces UnpaidConsensus for these cases, which matches
v3.1-dev's current state without #3608's bump emission.1 parent c402712 commit 583bd6d
1 file changed
Lines changed: 20 additions & 14 deletions
File tree
- packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/document
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1847 | 1847 | | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | | - | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1851 | 1858 | | |
1852 | 1859 | | |
1853 | 1860 | | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
| 1861 | + | |
| 1862 | + | |
1860 | 1863 | | |
1861 | 1864 | | |
1862 | 1865 | | |
| |||
2355 | 2358 | | |
2356 | 2359 | | |
2357 | 2360 | | |
2358 | | - | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
2359 | 2369 | | |
2360 | 2370 | | |
2361 | 2371 | | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
| 2372 | + | |
| 2373 | + | |
2368 | 2374 | | |
2369 | 2375 | | |
2370 | 2376 | | |
| |||
0 commit comments