Constraining dynamic array size with reusable policy class

Before doing t.randomize(), you need to assign t.data= new[1] which will solve this constraint error. Constraint failure has occurred because, data size in t was zero and in txn_policy it expects it to be of 1.

Thanks,
Juhi Patel.
https://www.linkedin.com/in/juhi-patel-455535149