[−][src]Function tendermint_light_client::predicates::verify
pub fn verify(
vp: &dyn VerificationPredicates,
voting_power_calculator: &dyn VotingPowerCalculator,
commit_validator: &dyn CommitValidator,
hasher: &dyn Hasher,
trusted: &LightBlock,
untrusted: &LightBlock,
options: &Options,
now: Time
) -> Result<(), VerificationError>
Validate the given light block.
- Ensure the latest trusted header hasn't expired
- Ensure the header validator hashes match the given validators
- Ensure the header next validator hashes match the given next validators
- Additional implementation specific validation via
commit_validator
- Check that the untrusted block is more recent than the trusted state
- If the untrusted block is the very next block after the trusted block, check that their (next) validator sets hashes match.
- Otherwise, ensure that the untrusted block has a greater height than the trusted block.