mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 04:31:02 +00:00
Match substrate's fmt (#1148)
* Alter gitlab. * Use substrate's rustfmt.toml * cargo +nightly fmt --all * Fix spellcheck. * cargo +nightly fmt --all * format. * Fix spellcheck and fmt * fmt? * Fix spellcheck Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
@@ -45,7 +45,8 @@ impl Account {
|
||||
let data = self.0.encode();
|
||||
let mut bytes = [0_u8; 32];
|
||||
bytes[0..data.len()].copy_from_slice(&*data);
|
||||
SecretKey::from_bytes(&bytes).expect("A static array of the correct length is a known good.")
|
||||
SecretKey::from_bytes(&bytes)
|
||||
.expect("A static array of the correct length is a known good.")
|
||||
}
|
||||
|
||||
pub fn pair(&self) -> Keypair {
|
||||
@@ -57,7 +58,8 @@ impl Account {
|
||||
let public = self.public();
|
||||
pair[32..].copy_from_slice(&public.to_bytes());
|
||||
|
||||
Keypair::from_bytes(&pair).expect("We expect the SecretKey to be good, so this must also be good.")
|
||||
Keypair::from_bytes(&pair)
|
||||
.expect("We expect the SecretKey to be good, so this must also be good.")
|
||||
}
|
||||
|
||||
pub fn sign(&self, msg: &[u8]) -> Signature {
|
||||
@@ -79,10 +81,7 @@ pub fn voter_set() -> VoterSet<AuthorityId> {
|
||||
|
||||
/// Convenience function to get a list of Grandpa authorities.
|
||||
pub fn authority_list() -> AuthorityList {
|
||||
test_keyring()
|
||||
.iter()
|
||||
.map(|(id, w)| (AuthorityId::from(*id), *w))
|
||||
.collect()
|
||||
test_keyring().iter().map(|(id, w)| (AuthorityId::from(*id), *w)).collect()
|
||||
}
|
||||
|
||||
/// Get the corresponding identities from the keyring for the "standard" authority set.
|
||||
|
||||
Reference in New Issue
Block a user