Rework upgradeable loader cli (bp #14209) (#14337)

* Rework upgradeable loader cli (#14209)

(cherry picked from commit 3316e7166c)

# Conflicts:
#	cli/src/cli.rs
#	cli/tests/program.rs

* fix conflicts

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2020-12-30 01:01:19 +00:00
committed by GitHub
parent 50e733837a
commit 30d7f6fa0b
7 changed files with 1788 additions and 1367 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 {