avalanche_types/verify.rs
1//! Verifiable trait.
2use crate::errors::Result;
3
4/// Verifiable can be verified.
5/// ref. <https://pkg.go.dev/github.com/ava-labs/avalanchego/vms/components#Verifiable>
6pub trait Verifiable {
7 /// Verifies the block or vertex.
8 /// The protocol must ensure that its parents has already been verified.
9 fn verify(&self) -> Result<()>;
10}