Skip to content

Commit 75ccbf1

Browse files
committed
set priority for batch reveals
1 parent d7a64ba commit 75ccbf1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,18 @@ where
14611461
Err(InvalidTransaction::Custom(2).into())
14621462
}
14631463
}
1464+
Some(Call::batch_reveal_weights { netuid, .. }) => {
1465+
if Self::check_weights_min_stake(who) {
1466+
let priority: u64 = Self::get_priority_set_weights(who, *netuid);
1467+
Ok(ValidTransaction {
1468+
priority,
1469+
longevity: 1,
1470+
..Default::default()
1471+
})
1472+
} else {
1473+
Err(InvalidTransaction::Custom(6).into())
1474+
}
1475+
}
14641476
Some(Call::set_weights { netuid, .. }) => {
14651477
if Self::check_weights_min_stake(who) {
14661478
let priority: u64 = Self::get_priority_set_weights(who, *netuid);

0 commit comments

Comments
 (0)