Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andreea-popescu-reef committed May 29, 2024
1 parent 686e6fb commit 6b6a290
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pallets/subtensor/src/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ impl<T: Config> Pallet<T> {
Self::append_neuron(netuid, &hotkey, current_block_number);
log::info!("add new neuron account");
} else {

// HEREEE

// --- 11.1.1 Replacement required.
// We take the neuron with the lowest pruning score here.
subnetwork_uid = Self::get_neuron_to_prune(netuid);
Expand Down
8 changes: 8 additions & 0 deletions pallets/subtensor/src/uids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ impl<T: Config> Pallet<T> {
Uids::<T>::insert(netuid, new_hotkey.clone(), uid_to_replace); // Make uid - hotkey association.
BlockAtRegistration::<T>::insert(netuid, uid_to_replace, block_number); // Fill block at registration.
IsNetworkMember::<T>::insert(new_hotkey.clone(), netuid, true); // Fill network is member.

// HEREEE
Trust::<T>::insert(netuid, 0);
Emission::<T>::insert(netuid, 0);
Consensus::<T>::insert(netuid, 0);
Incentive::<T>::insert(netuid, 0);
Dividends::<T>::insert(netuid, 0);

}

// Appends the uid to the network.
Expand Down

0 comments on commit 6b6a290

Please sign in to comment.