blockchain: forbid bulletproof types before v8

They were already forbidden implicitely, but let's make that
explicit for robustness
This commit is contained in:
moneromooo-monero 2018-03-16 15:00:59 +00:00
parent 51bb7fafac
commit 20a002667c
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -2407,7 +2407,8 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
// from v8, allow bulletproofs
if (hf_version < 8) {
if (!tx.rct_signatures.p.bulletproofs.empty())
const bool bulletproof = tx.rct_signatures.type == rct::RCTTypeFullBulletproof || tx.rct_signatures.type == rct::RCTTypeSimpleBulletproof;
if (bulletproof || !tx.rct_signatures.p.bulletproofs.empty())
{
MERROR("Bulletproofs are not allowed before v8");
tvc.m_invalid_output = true;