1
0
Fork 0
forked from lthn/blockchain

coretests: more cases for escrow_custom_test (zero pledges + contract cancellation) -- exposes a bug

This commit is contained in:
sowle 2019-07-16 15:19:04 +03:00
parent 8d0c8a579f
commit 5777e2b848

View file

@ -1589,6 +1589,35 @@ bool escrow_custom_test::generate(std::vector<test_event_entry>& events) const
test_details.push_back(cd);
}
{
escrow_custom_test_callback_details cd = test_details[0];
cd.cpd.comment = "cancellation: zero A pledge";
cd.cpd.amount_a_pledge = 0;
cd.release_type = BC_ESCROW_SERVICE_INSTRUCTION_RELEASE_CANCEL;
cd.a_cancel_proposal_fee = 3 * TESTS_DEFAULT_FEE;
cd.cancellation_expiration_period = 1000;
test_details.push_back(cd);
}
{
escrow_custom_test_callback_details cd = test_details[0];
cd.cpd.comment = "cancellation: zero B pledge";
cd.cpd.amount_b_pledge = 0;
cd.release_type = BC_ESCROW_SERVICE_INSTRUCTION_RELEASE_CANCEL;
cd.a_cancel_proposal_fee = 3 * TESTS_DEFAULT_FEE;
cd.cancellation_expiration_period = 1000;
test_details.push_back(cd);
}
{
escrow_custom_test_callback_details cd = test_details[0];
cd.cpd.comment = "cancellation: zero amount to pay";
cd.cpd.amount_to_pay = 0;
cd.release_type = BC_ESCROW_SERVICE_INSTRUCTION_RELEASE_CANCEL;
cd.a_cancel_proposal_fee = 3 * TESTS_DEFAULT_FEE;
cd.cancellation_expiration_period = 1000;
test_details.push_back(cd);
}
for(auto cd : test_details)
{