Why does the predicate call fail when I remove checks from it?

Hi guys
I have this predicate, it builds well and all tests are pass

I have a few checks of output types here like that

After checking the sway repo I understand that checks on lines 58 and 61 do the same and I decided to remove one of them

But if I comment first one (lines 57-60) and run forc build && cargo test I have this errors during sending of money to predicate

thread 'local_tests::cancel_order_test::cancel_order_test' panicked at 'range end index 1576 out of range for slice of length 1448', /Users/alexey/.cargo/git/checkouts/fuels-rs-ce5f345b87bf4c50/386fab5/packages/fuels-core/src/lib.rs:26:13

But if I comment second check (line 61) I have this error during fulfillment or cancellation of the order

thread 'local_tests::fulfill_order_test::fulfill_order_test' panicked at 'called `Result::unwrap()` on an `Err` value: IOError(Custom { kind: Other, error: "Response errors; Invalid transaction: The transaction contains a predicate which failed to validate: TransactionId(0xecc07d4960e7bb216e716e1b40f94955b4a75aa67847dc9e74b70196254c4723)" })', tests/local_tests/fulfill_order_test.rs:95:6

If I comment both checks I have this error

thread 'local_tests::fulfill_order_test::fulfill_order_test' panicked at 'range end index 1576 out of range for slice of length 1424', /Users/alexey/.cargo/git/checkouts/fuels-rs-ce5f345b87bf4c50/386fab5/packages/fuels-core/src/lib.rs:26:13

Can you explain please how to fix that?

The tests are passing for me, I wonder if this is just because of some caching?

1 Like

will check on the new forc version :saluting_face:
Also, Is it ok to use that commands to remove the cache?

rm -rf Forc.lock Cargo.lock out target