@@ -220,7 +220,7 @@ pub mod pallet {
220220 ) ?;
221221 pallet_subtensor:: Pallet :: < T > :: set_serving_rate_limit ( netuid, serving_rate_limit) ;
222222 log:: debug!( "ServingRateLimitSet( serving_rate_limit: {serving_rate_limit:?} ) " ) ;
223- Self :: record_owner_rl (
223+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
224224 maybe_owner,
225225 netuid,
226226 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -279,7 +279,7 @@ pub mod pallet {
279279 log:: debug!(
280280 "MaxDifficultySet( netuid: {netuid:?} max_difficulty: {max_difficulty:?} ) "
281281 ) ;
282- Self :: record_owner_rl (
282+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
283283 maybe_owner,
284284 netuid,
285285 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -313,7 +313,7 @@ pub mod pallet {
313313 Error :: <T >:: SubnetDoesNotExist
314314 ) ;
315315
316- Self :: record_owner_rl (
316+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
317317 maybe_owner,
318318 netuid,
319319 & [
@@ -407,7 +407,7 @@ pub mod pallet {
407407 Error :: <T >:: SubnetDoesNotExist
408408 ) ;
409409 pallet_subtensor:: Pallet :: < T > :: set_adjustment_alpha ( netuid, adjustment_alpha) ;
410- Self :: record_owner_rl (
410+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
411411 maybe_owner,
412412 netuid,
413413 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -439,7 +439,7 @@ pub mod pallet {
439439 Error :: <T >:: SubnetDoesNotExist
440440 ) ;
441441 pallet_subtensor:: Pallet :: < T > :: set_max_weight_limit ( netuid, max_weight_limit) ;
442- Self :: record_owner_rl (
442+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
443443 maybe_owner,
444444 netuid,
445445 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -473,7 +473,7 @@ pub mod pallet {
473473 ) ;
474474
475475 pallet_subtensor:: Pallet :: < T > :: set_immunity_period ( netuid, immunity_period) ;
476- Self :: record_owner_rl (
476+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
477477 maybe_owner,
478478 netuid,
479479 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -510,7 +510,7 @@ pub mod pallet {
510510 log:: debug!(
511511 "MinAllowedWeightSet( netuid: {netuid:?} min_allowed_weights: {min_allowed_weights:?} ) "
512512 ) ;
513- Self :: record_owner_rl (
513+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
514514 maybe_owner,
515515 netuid,
516516 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -566,7 +566,7 @@ pub mod pallet {
566566 ) ;
567567 pallet_subtensor:: Pallet :: < T > :: set_kappa ( netuid, kappa) ;
568568 log:: debug!( "KappaSet( netuid: {netuid:?} kappa: {kappa:?} ) " ) ;
569- Self :: record_owner_rl (
569+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
570570 maybe_owner,
571571 netuid,
572572 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -594,7 +594,7 @@ pub mod pallet {
594594 ) ;
595595 pallet_subtensor:: Pallet :: < T > :: set_rho ( netuid, rho) ;
596596 log:: debug!( "RhoSet( netuid: {netuid:?} rho: {rho:?} ) " ) ;
597- Self :: record_owner_rl (
597+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
598598 maybe_owner,
599599 netuid,
600600 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -634,7 +634,7 @@ pub mod pallet {
634634 log:: debug!(
635635 "ActivityCutoffSet( netuid: {netuid:?} activity_cutoff: {activity_cutoff:?} ) "
636636 ) ;
637- Self :: record_owner_rl (
637+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
638638 maybe_owner,
639639 netuid,
640640 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -695,7 +695,7 @@ pub mod pallet {
695695 log:: debug!(
696696 "NetworkPowRegistrationAllowed( registration_allowed: {registration_allowed:?} ) "
697697 ) ;
698- Self :: record_owner_rl (
698+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
699699 maybe_owner,
700700 netuid,
701701 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -763,7 +763,7 @@ pub mod pallet {
763763 ) ;
764764 pallet_subtensor:: Pallet :: < T > :: set_min_burn ( netuid, min_burn) ;
765765 log:: debug!( "MinBurnSet( netuid: {netuid:?} min_burn: {min_burn:?} ) " ) ;
766- Self :: record_owner_rl (
766+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
767767 maybe_owner,
768768 netuid,
769769 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -803,7 +803,7 @@ pub mod pallet {
803803 ) ;
804804 pallet_subtensor:: Pallet :: < T > :: set_max_burn ( netuid, max_burn) ;
805805 log:: debug!( "MaxBurnSet( netuid: {netuid:?} max_burn: {max_burn:?} ) " ) ;
806- Self :: record_owner_rl (
806+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
807807 maybe_owner,
808808 netuid,
809809 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -898,7 +898,7 @@ pub mod pallet {
898898 log:: debug!(
899899 "BondsMovingAverageSet( netuid: {netuid:?} bonds_moving_average: {bonds_moving_average:?} ) "
900900 ) ;
901- Self :: record_owner_rl (
901+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
902902 maybe_owner,
903903 netuid,
904904 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -930,7 +930,7 @@ pub mod pallet {
930930 ) ;
931931 pallet_subtensor:: Pallet :: < T > :: set_bonds_penalty ( netuid, bonds_penalty) ;
932932 log:: debug!( "BondsPenalty( netuid: {netuid:?} bonds_penalty: {bonds_penalty:?} ) " ) ;
933- Self :: record_owner_rl (
933+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
934934 maybe_owner,
935935 netuid,
936936 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1215,7 +1215,7 @@ pub mod pallet {
12151215
12161216 pallet_subtensor:: Pallet :: < T > :: set_commit_reveal_weights_enabled ( netuid, enabled) ;
12171217 log:: debug!( "ToggleSetWeightsCommitReveal( netuid: {netuid:?} ) " ) ;
1218- Self :: record_owner_rl (
1218+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
12191219 maybe_owner,
12201220 netuid,
12211221 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1246,7 +1246,7 @@ pub mod pallet {
12461246 ) ?;
12471247 pallet_subtensor:: Pallet :: < T > :: set_liquid_alpha_enabled ( netuid, enabled) ;
12481248 log:: debug!( "LiquidAlphaEnableToggled( netuid: {netuid:?}, Enabled: {enabled:?} ) " ) ;
1249- Self :: record_owner_rl (
1249+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
12501250 maybe_owner,
12511251 netuid,
12521252 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1272,7 +1272,7 @@ pub mod pallet {
12721272 origin, netuid, alpha_low, alpha_high,
12731273 ) ;
12741274 if res. is_ok ( ) {
1275- Self :: record_owner_rl (
1275+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
12761276 maybe_owner,
12771277 netuid,
12781278 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1384,7 +1384,7 @@ pub mod pallet {
13841384 log:: debug!( "SetWeightCommitInterval( netuid: {netuid:?}, interval: {interval:?} ) " ) ;
13851385
13861386 pallet_subtensor:: Pallet :: < T > :: set_reveal_period ( netuid, interval) ?;
1387- Self :: record_owner_rl (
1387+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
13881388 maybe_owner,
13891389 netuid,
13901390 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1469,7 +1469,7 @@ pub mod pallet {
14691469 ) ?;
14701470 let res = pallet_subtensor:: Pallet :: < T > :: toggle_transfer ( netuid, toggle) ;
14711471 if res. is_ok ( ) {
1472- Self :: record_owner_rl (
1472+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
14731473 maybe_owner,
14741474 netuid,
14751475 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1624,7 +1624,7 @@ pub mod pallet {
16241624 pallet_subtensor:: Pallet :: < T > :: set_alpha_sigmoid_steepness ( netuid, steepness) ;
16251625
16261626 log:: debug!( "AlphaSigmoidSteepnessSet( netuid: {netuid:?}, steepness: {steepness:?} )" ) ;
1627- Self :: record_owner_rl (
1627+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
16281628 maybe_owner,
16291629 netuid,
16301630 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1657,7 +1657,7 @@ pub mod pallet {
16571657
16581658 Self :: deposit_event ( Event :: Yuma3EnableToggled { netuid, enabled } ) ;
16591659 log:: debug!( "Yuma3EnableToggled( netuid: {netuid:?}, Enabled: {enabled:?} ) " ) ;
1660- Self :: record_owner_rl (
1660+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
16611661 maybe_owner,
16621662 netuid,
16631663 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1690,7 +1690,7 @@ pub mod pallet {
16901690
16911691 Self :: deposit_event ( Event :: BondsResetToggled { netuid, enabled } ) ;
16921692 log:: debug!( "BondsResetToggled( netuid: {netuid:?} bonds_reset: {enabled:?} ) " ) ;
1693- Self :: record_owner_rl (
1693+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
16941694 maybe_owner,
16951695 netuid,
16961696 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1800,7 +1800,7 @@ pub mod pallet {
18001800 & [ TransactionType :: OwnerHyperparamUpdate ] ,
18011801 ) ?;
18021802 pallet_subtensor:: Pallet :: < T > :: set_owner_immune_neuron_limit ( netuid, immune_neurons) ?;
1803- Self :: record_owner_rl (
1803+ pallet_subtensor :: Pallet :: < T > :: record_owner_rl (
18041804 maybe_owner,
18051805 netuid,
18061806 & [ TransactionType :: OwnerHyperparamUpdate ] ,
@@ -1847,24 +1847,6 @@ pub mod pallet {
18471847 Ok ( ( ) )
18481848 }
18491849 }
1850-
1851- impl < T : Config > Pallet < T > {
1852- // Helper: if owner path, record last-blocks for the provided TransactionTypes
1853- fn record_owner_rl (
1854- maybe_owner : Option < <T as frame_system:: Config >:: AccountId > ,
1855- netuid : NetUid ,
1856- txs : & [ TransactionType ] ,
1857- ) {
1858- if let Some ( who) = maybe_owner {
1859- let now = pallet_subtensor:: Pallet :: < T > :: get_current_block_as_u64 ( ) ;
1860- for tx in txs {
1861- pallet_subtensor:: Pallet :: < T > :: set_last_transaction_block_on_subnet (
1862- & who, netuid, tx, now,
1863- ) ;
1864- }
1865- }
1866- }
1867- }
18681850}
18691851
18701852impl < T : Config > sp_runtime:: BoundToRuntimeAppPublic for Pallet < T > {
0 commit comments