Skip to content

Commit

Permalink
VerifyMessages execution endpoint just checks if the provided message…
Browse files Browse the repository at this point in the history
…s are verified
  • Loading branch information
themicp committed Nov 27, 2023
1 parent 1805161 commit 4e2bc39
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions light-client/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ pub fn execute(
VERIFIED_MESSAGES.save(deps.storage, payload.message.hash_id(), &payload.message)?;
Ok(Response::new())
}
VerifyMessages { messages } => {
let res = messages
.into_iter()
.map(|message| {
let result = VERIFIED_MESSAGES.load(deps.storage, message.hash_id());
(message, result.is_ok())
})
.collect::<Vec<(Message, bool)>>();

for item in res.iter() {
println!("{:?}", item);
}
Ok(Response::new())
}
}
}

Expand Down

0 comments on commit 4e2bc39

Please sign in to comment.