We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b2a266 commit 1b66080Copy full SHA for 1b66080
pallets/subtensor/src/lib.rs
@@ -2207,9 +2207,13 @@ where
2207
self,
2208
who: &Self::AccountId,
2209
call: &Self::Call,
2210
- _info: &DispatchInfoOf<Self::Call>,
2211
- _len: usize,
+ info: &DispatchInfoOf<Self::Call>,
+ len: usize,
2212
) -> Result<Self::Pre, TransactionValidityError> {
2213
+ // We need to perform same checks as Self::validate so that
2214
+ // the validation is performed during Executive::apply_extrinsic as well.
2215
+ // this prevents inclusion of invalid tx in a block by malicious block author.
2216
+ self.validate(who, call, info, len)?;
2217
match call.is_sub_type() {
2218
Some(Call::add_stake { .. }) => {
2219
let transaction_fee = 100000;
0 commit comments