Include own node in stake table (#29838)

This commit is contained in:
Brennan Watt 2023-01-24 09:34:44 -08:00 committed by GitHub
parent 1c7662a37f
commit 0be194145b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -100,6 +100,11 @@ impl StakedNodesUpdaterService {
Some((node.tvu.ip(), *stake))
})
.collect();
let my_pubkey = cluster_info.my_contact_info().id;
if let Some(stake) = staked_nodes.get(&my_pubkey) {
id_to_stake.insert(my_pubkey, *stake);
ip_to_stake.insert(cluster_info.my_contact_info().tvu.ip(), *stake);
}
Self::override_stake(
cluster_info,
total_stake,