mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
babe, grandpa: cleanup stale equivocation reports (#8041)
* grandpa: check equivocation report staleness on `validate_unsigned` * babe: check equivocation report staleness on `validate_unsigned` * node: bump spec_version * babe, grandpa: remove duplicate call destructuring
This commit is contained in:
@@ -676,7 +676,16 @@ fn report_equivocation_validate_unsigned_prevents_duplicates() {
|
||||
Babe::report_equivocation_unsigned(Origin::none(), equivocation_proof, key_owner_proof)
|
||||
.unwrap();
|
||||
|
||||
// the report should now be considered stale and the transaction is invalid
|
||||
// the report should now be considered stale and the transaction is invalid.
|
||||
// the check for staleness should be done on both `validate_unsigned` and on `pre_dispatch`
|
||||
assert_err!(
|
||||
<Babe as sp_runtime::traits::ValidateUnsigned>::validate_unsigned(
|
||||
TransactionSource::Local,
|
||||
&inner,
|
||||
),
|
||||
InvalidTransaction::Stale,
|
||||
);
|
||||
|
||||
assert_err!(
|
||||
<Babe as sp_runtime::traits::ValidateUnsigned>::pre_dispatch(&inner),
|
||||
InvalidTransaction::Stale,
|
||||
|
||||
Reference in New Issue
Block a user