solana-validator set-identity now loads the tower file for the new identity

This commit is contained in:
Michael Vines
2021-07-20 20:53:14 -07:00
parent 71bd434297
commit 61865c0ee0
5 changed files with 44 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ pub struct Tower {
last_vote_tx_blockhash: Hash,
last_timestamp: BlockTimestamp,
#[serde(skip)]
ledger_path: PathBuf,
pub(crate) ledger_path: PathBuf,
#[serde(skip)]
path: PathBuf,
#[serde(skip)]
@@ -175,7 +175,7 @@ impl Tower {
tower
}
pub(crate) fn set_identity(&mut self, node_pubkey: Pubkey) {
fn set_identity(&mut self, node_pubkey: Pubkey) {
let path = Self::get_filename(&self.ledger_path, &node_pubkey);
let tmp_path = Self::get_tmp_filename(&path);
self.node_pubkey = node_pubkey;