Rework upgradeable loader cli (#14209)

This commit is contained in:
Jack May
2020-12-21 13:02:53 -08:00
committed by GitHub
parent 7b08cb1f0d
commit 3316e7166c
7 changed files with 1781 additions and 1373 deletions

View File

@ -58,6 +58,15 @@ impl CliSignerInfo {
Some(0)
}
}
pub fn index_of_or_none(&self, pubkey: Option<Pubkey>) -> Option<usize> {
if let Some(pubkey) = pubkey {
self.signers
.iter()
.position(|signer| signer.pubkey() == pubkey)
} else {
None
}
}
}
pub struct DefaultSigner {