Follow up to persistent tower with tests and API cleaning (#12350)
* Follow up to persistent tower * Ignore for now... * Hard-code validator identities for easy reasoning * Add a test for opt. conf violation without tower * Fix compile with rust < 1.47 * Remove unused method * More move of assert tweak to the asser pr * Add comments * Clean up * Clean the test addressing various review comments * Clean up a bit
This commit is contained in:
@ -43,6 +43,15 @@ impl Keypair {
|
||||
self.0.to_bytes()
|
||||
}
|
||||
|
||||
pub fn from_base58_string(s: &str) -> Self {
|
||||
Self::from_bytes(&bs58::decode(s).into_vec().unwrap()).unwrap()
|
||||
}
|
||||
|
||||
pub fn to_base58_string(&self) -> String {
|
||||
// Remove .iter() once we're rust 1.47+
|
||||
bs58::encode(&self.0.to_bytes().iter()).into_string()
|
||||
}
|
||||
|
||||
pub fn secret(&self) -> &ed25519_dalek::SecretKey {
|
||||
&self.0.secret
|
||||
}
|
||||
|
Reference in New Issue
Block a user