Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More compact code
  • Loading branch information
davxy committed Feb 21, 2022
commit 1a4feec4026b289f11fc7983636d53fd80144fd0
3 changes: 1 addition & 2 deletions frame/contracts/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1873,8 +1873,7 @@ benchmarks! {
let signatures = (0..r * API_BENCHMARK_BATCH_SIZE)
.map(|i| {
let sig = sp_io::crypto::ecdsa_sign_prehashed(key_type, &pub_key, &message_hash).expect("Generates signature");
let bytes: &[u8; 65] = sig.as_ref();
bytes.to_vec()
AsRef::<[u8; 65]>::as_ref(&sig).to_vec()
})
.collect::<Vec<_>>();
let signatures = signatures.iter().flatten().cloned().collect::<Vec<_>>();
Expand Down