bulletproofs: add multi output bulletproofs to rct

This commit is contained in:
moneromooo-monero 2018-01-17 21:50:03 +00:00
parent f34e2e20bd
commit 9ce9f8caf6
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
13 changed files with 247 additions and 97 deletions

View file

@ -3059,6 +3059,22 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
MERROR_VER("Unsupported rct type: " << rv.type);
return false;
}
// for bulletproofs, check they're only multi-output after v8
if (rv.type == rct::RCTTypeFullBulletproof || rv.type == rct::RCTTypeSimpleBulletproof)
{
if (hf_version < 8)
{
for (const rct::Bulletproof &proof: rv.p.bulletproofs)
{
if (proof.V.size() > 1)
{
MERROR_VER("Multi output bulletproofs are invalid before v8");
return false;
}
}
}
}
}
return true;
}