Enforce zk-SNARK validity during consensus.

This commit is contained in:
Sean Bowe
2016-01-08 02:00:54 -07:00
parent 0a87fc4ad0
commit 03bff15fe2
4 changed files with 23 additions and 1 deletions

View File

@@ -391,6 +391,9 @@ BOOST_AUTO_TEST_CASE(test_simple_pour_invalidity)
// pours.
CMutableTransaction newTx(tx);
CValidationState state;
state.SetPerformPourVerification(false); // don't verify the snark
// No pours, vin and vout, means it should be invalid.
BOOST_CHECK(!CheckTransaction(newTx, state));
BOOST_CHECK(state.GetRejectReason() == "bad-txns-vin-empty");