mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 18:01:03 +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:
@@ -775,6 +775,15 @@ fn report_equivocation_validate_unsigned_prevents_duplicates() {
|
||||
.unwrap();
|
||||
|
||||
// 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!(
|
||||
<Grandpa as sp_runtime::traits::ValidateUnsigned>::validate_unsigned(
|
||||
TransactionSource::Local,
|
||||
&call,
|
||||
),
|
||||
InvalidTransaction::Stale,
|
||||
);
|
||||
|
||||
assert_err!(
|
||||
<Grandpa as sp_runtime::traits::ValidateUnsigned>::pre_dispatch(&call),
|
||||
InvalidTransaction::Stale,
|
||||
|
||||
Reference in New Issue
Block a user