mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 13:23:29 +01:00
Human readable message if maximum outputs reached
This commit is contained in:
parent
227bf1407e
commit
de32dcea1d
@ -389,6 +389,7 @@ namespace cryptonote
|
|||||||
for (const auto &bp: rv.p.bulletproofs)
|
for (const auto &bp: rv.p.bulletproofs)
|
||||||
nlr += bp.L.size() * 2;
|
nlr += bp.L.size() * 2;
|
||||||
const size_t bp_size = 32 * (9 + nlr);
|
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");
|
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;
|
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");
|
CHECK_AND_ASSERT_THROW_MES_L1(bp_clawback <= std::numeric_limits<uint64_t>::max() - blob_size, "Weight overflow");
|
||||||
|
Loading…
Reference in New Issue
Block a user