mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 00:01:03 +00:00
grandpa: report equivocations with unsigned extrinsics (#6656)
* grandpa: use unsigned extrinsics for equivocation reporting * grandpa: allow signed reports as well * grandpa: change runtime api for submitting unsigned extrinsics * grandpa: fix tests * grandpa: add test for unsigned validation * grandpa: add benchmark for equivocation proof checking * offences: fix grandpa benchmark * grandpa: add proper weight for equivocation reporting extrinsic * grandpa: fix weight unit
This commit is contained in:
@@ -515,12 +515,14 @@ where
|
||||
equivocation,
|
||||
);
|
||||
|
||||
self.client.runtime_api()
|
||||
.submit_report_equivocation_extrinsic(
|
||||
self.client
|
||||
.runtime_api()
|
||||
.submit_report_equivocation_unsigned_extrinsic(
|
||||
&BlockId::Hash(best_header.hash()),
|
||||
equivocation_proof,
|
||||
key_owner_proof,
|
||||
).map_err(Error::Client)?;
|
||||
)
|
||||
.map_err(Error::Client)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ sp_api::mock_impl_runtime_apis! {
|
||||
self.inner.genesis_authorities.clone()
|
||||
}
|
||||
|
||||
fn submit_report_equivocation_extrinsic(
|
||||
fn submit_report_equivocation_unsigned_extrinsic(
|
||||
_equivocation_proof: EquivocationProof<Hash, BlockNumber>,
|
||||
_key_owner_proof: OpaqueKeyOwnershipProof,
|
||||
) -> Option<()> {
|
||||
|
||||
Reference in New Issue
Block a user