generator: cleanups in Pedersen/generator code
Silence a compiler warning about an unitialized use of a scalar in case the user tries to provide a 0-length list of commitments. Also ensures that commitments have normalized field elements when they are loaded into ges.
This commit is contained in:
parent
0a6006989f
commit
6162d577fe
@ -391,6 +391,7 @@ int secp256k1_pedersen_blind_generator_blind_sum(const secp256k1_context* ctx, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
secp256k1_scalar_set_int(&sum, 0);
|
secp256k1_scalar_set_int(&sum, 0);
|
||||||
|
secp256k1_scalar_set_int(&tmp, 0);
|
||||||
|
|
||||||
/* Here, n_total > 0. Thus the loop runs at least once.
|
/* Here, n_total > 0. Thus the loop runs at least once.
|
||||||
Thus we may use a do-while loop, which checks the loop
|
Thus we may use a do-while loop, which checks the loop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user