2023-12-06 09:53:48 -05:00
|
|
|
use sp_consensus_babe::EquivocationProof;
|
|
|
|
|
|
|
|
|
|
use serai_primitives::Header;
|
|
|
|
|
|
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 {
|
|
|
|
|
pub equivocation_proof: Box<EquivocationProof<Header>>,
|
|
|
|
|
pub key_owner_proof: (),
|
|
|
|
|
}
|
|
|
|
|
|
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),
|
|
|
|
|
}
|