Fix pub key getting in signature verification

This commit is contained in:
Paul Hauner 2018-09-25 23:31:58 +10:00
parent 9207a44bce
commit 6529b4c09f
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -48,7 +48,8 @@ pub fn verify_aggregate_signature_for_indices<T>(
/*
* Load the validators public key from our store.
*/
let pub_key = validator_store.get_public_key_by_index(i)?
let pub_key = validator_store
.get_public_key_by_index(validator)?
.ok_or(SignatureVerificationError::NoPublicKeyForValidator)?;
/*
* Add the validators public key to the aggregate public key.