2023-12-06 09:53:48 -05:00
|
|
|
use sp_consensus_babe::EquivocationProof;
|
|
|
|
|
|
2023-12-17 01:44:08 +03:00
|
|
|
use serai_primitives::{Header, SeraiAddress};
|
2023-12-06 09:53:48 -05:00
|
|
|
|
2023-12-07 02:30:09 -05:00
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
2023-12-06 09:53:48 -05:00
|
|
|
pub struct ReportEquivocation {
|
2024-06-02 19:58:29 -04:00
|
|
|
pub equivocation_proof: alloc::boxed::Box<EquivocationProof<Header>>,
|
2023-12-17 01:44:08 +03:00
|
|
|
pub key_owner_proof: SeraiAddress,
|
2023-12-06 09:53:48 -05:00
|
|
|
}
|
|
|
|
|
|
2023-12-07 02:30:09 -05:00
|
|
|
// We could define a Babe Config here and use the literal pallet_babe::Call
|
|
|
|
|
// The disadvantage to this would be the complexity and presence of junk fields such as `__Ignore`
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
2023-12-06 09:53:48 -05:00
|
|
|
pub enum Call {
|
|
|
|
|
report_equivocation(ReportEquivocation),
|
|
|
|
|
report_equivocation_unsigned(ReportEquivocation),
|
|
|
|
|
}
|