Merge pull request #5135

de32dcea Human readable message if maximum outputs reached (italocoin)
release-v0.6.1.2
Riccardo Spagni 5 years ago
commit 50d48d6118
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

@ -396,6 +396,7 @@ namespace cryptonote
for (const auto &bp: rv.p.bulletproofs)
nlr += bp.L.size() * 2;
const size_t bp_size = 32 * (9 + nlr);
CHECK_AND_ASSERT_THROW_MES_L1(n_outputs <= BULLETPROOF_MAX_OUTPUTS, "maximum number of outputs is " + std::to_string(BULLETPROOF_MAX_OUTPUTS) + " per transaction");
CHECK_AND_ASSERT_THROW_MES_L1(bp_base * n_padded_outputs >= bp_size, "Invalid bulletproof clawback");
const uint64_t bp_clawback = (bp_base * n_padded_outputs - bp_size) * 4 / 5;
CHECK_AND_ASSERT_THROW_MES_L1(bp_clawback <= std::numeric_limits<uint64_t>::max() - blob_size, "Weight overflow");

Loading…
Cancel
Save