fix clippy issues (#991)

This commit is contained in:
Svyatoslav Nikolsky
2021-06-08 14:33:48 +03:00
committed by Bastian Köcher
parent cab4c7cd05
commit 812e782904
14 changed files with 32 additions and 27 deletions
+2 -2
View File
@@ -245,7 +245,7 @@ impl AuraHeader {
/// Get step this header is generated for.
pub fn step(&self) -> Option<u64> {
self.seal.get(0).map(|x| Rlp::new(&x)).and_then(|x| x.as_val().ok())
self.seal.get(0).map(|x| Rlp::new(x)).and_then(|x| x.as_val().ok())
}
/// Get header author' signature.
@@ -496,7 +496,7 @@ pub fn transaction_decode_rlp(raw_tx: &[u8]) -> Result<Transaction, DecoderError
let message = unsigned.message(chain_id);
// recover tx sender
let sender_public = sp_io::crypto::secp256k1_ecdsa_recover(&signature, &message.as_fixed_bytes())
let sender_public = sp_io::crypto::secp256k1_ecdsa_recover(&signature, message.as_fixed_bytes())
.map_err(|_| rlp::DecoderError::Custom("Failed to recover transaction sender"))?;
let sender_address = public_to_address(&sender_public);