Skip to content

Commit

Permalink
evaluate validation context in aggregate_messages
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Dec 23, 2023
1 parent 9955b0e commit e6c4519
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crypto::{EnclavePublicKey, Signer, Verifier};
use ecall_commands::{AggregateMessagesInput, AggregateMessagesResult, LightClientResult};
use light_client::{
commitments::{self, prove_commitment, Message, UpdateClientMessage},
LightClientResolver,
HostContext, LightClientResolver,
};
use store::KVStore;

Expand Down Expand Up @@ -38,6 +38,7 @@ pub fn aggregate_messages<R: LightClientResolver, S: KVStore, K: Signer>(
.zip(input.signatures.iter())
.map(|(c, s)| -> Result<_, Error> {
verify_commitment(&pk, &c, s)?;
c.context.validate(ctx.host_timestamp())?;
Ok(c)
})
.collect::<Result<Vec<_>, _>>()?;
Expand Down

0 comments on commit e6c4519

Please sign in to comment.