Use a constant for maximum surjection targets

This commit is contained in:
Andrew Chow 2021-06-17 18:47:24 -04:00
parent 4a44ff2c2e
commit 4940ceeea6
3 changed files with 4 additions and 2 deletions

View file

@ -192,7 +192,7 @@ bool SurjectOutput(CTxOutWitness& txoutwit, const std::vector<secp256k1_fixed_as
{
int ret;
// 1 to 3 targets
size_t nInputsToSelect = std::min((size_t)3, surjection_targets.size());
size_t nInputsToSelect = std::min(MAX_SURJECTION_TARGETS, surjection_targets.size());
unsigned char randseed[32];
GetStrongRandBytes(randseed, 32);
size_t input_index;