pub trait SlashingProofData<'a> {
const PROOF_TYPE: ProofType;
// Required methods
fn unpack(data: &'a [u8]) -> Result<Self, SlashingError>
where Self: Sized;
fn verify_proof(
self,
slot: Slot,
pubkey: &Pubkey,
) -> Result<(), SlashingError>;
}Expand description
Trait that proof accounts must satisfy in order to verify via the slashing program
Required Associated Constants§
Sourceconst PROOF_TYPE: ProofType
const PROOF_TYPE: ProofType
The type of proof this data represents
Required Methods§
Sourcefn unpack(data: &'a [u8]) -> Result<Self, SlashingError>where
Self: Sized,
fn unpack(data: &'a [u8]) -> Result<Self, SlashingError>where
Self: Sized,
Zero copy from raw data buffer
Sourcefn verify_proof(self, slot: Slot, pubkey: &Pubkey) -> Result<(), SlashingError>
fn verify_proof(self, slot: Slot, pubkey: &Pubkey) -> Result<(), SlashingError>
Verification logic for this type of proof data
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.