From 703c6a23584326d679fa70d4d1f8b200b58cc07e Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Thu, 4 Jul 2024 02:13:34 -0400 Subject: [PATCH] Typo corrections meant to be added in the prior commit --- substrate/validator-sets/pallet/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/substrate/validator-sets/pallet/src/lib.rs b/substrate/validator-sets/pallet/src/lib.rs index d660f93e..b89d6596 100644 --- a/substrate/validator-sets/pallet/src/lib.rs +++ b/substrate/validator-sets/pallet/src/lib.rs @@ -724,7 +724,7 @@ pub mod pallet { }); // Update the total allocated stake to be for the current set - self.set_total_allocated_stake(set.network); + Self::set_total_allocated_stake(set.network); } /// Take the amount deallocatable. @@ -912,8 +912,10 @@ pub mod pallet { Keys::::set(set, Some(key_pair.clone())); // If this is the first ever set for this network, set TotalAllocatedStake now + // We generally set TotalAllocatedStake when the prior set retires, and the new set is fully + // active and liable. Since this is the first set, there is no prior set to wait to retire if session == Session(0) { - self.set_total_allocated_stake(network); + Self::set_total_allocated_stake(network); } // This does not remove from TotalAllocatedStake or InSet in order to: