Check for canonical public keys and signatures

Only enabled inside tests for now.
This commit is contained in:
Pieter Wuille
2012-08-22 22:33:21 +02:00
parent bfc24bd4ce
commit 58bc86e37f
12 changed files with 245 additions and 62 deletions

View File

@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
break;
}
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), 0), strTest);
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), false, 0), strTest);
}
}
}
@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
break;
}
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), 0);
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool(), true, 0);
}
BOOST_CHECK_MESSAGE(!fValid, strTest);