Skip to content

Commit

Permalink
fix runtime-benchmarks test
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Apr 11, 2024
1 parent 0dd8a24 commit 7285b07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = '0.6.0'
description = "Reward citizens who participated in a crowdloan to acquire a parachain slot o nthe backing relay chain."

[dependencies]
ed25519-dalek = { version = "2.1", default-features = false, optional = true }
ed25519-dalek = { version = "2.1", default-features = false, features = ["alloc"], optional = true }
log = { version = "0.4.20", default-features = false }
parity-scale-codec = { version = "3.6.5", default-features = false}
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
Expand Down
7 changes: 3 additions & 4 deletions src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ fn create_sig<T: Config>(seed: u32, payload: Vec<u8>) -> (AccountId32, MultiSign
seed_32[j] = seed_as_slice[j]
}

let secret = ed25519_dalek::SecretKey::from_bytes(&seed_32).unwrap();
let public = ed25519_dalek::PublicKey::from(&secret);
let pair = ed25519_dalek::Keypair { secret, public };
let sig = pair.sign(&payload).to_bytes();
let signing_key = ed25519_dalek::SigningKey::from_bytes(&seed_32);
let public = signing_key.verifying_key();
let sig = signing_key.sign(&payload).to_bytes();
let signature: MultiSignature = ed25519::Signature::from_raw(sig).into();

let ed_public: ed25519::Public = ed25519::Public::unchecked_from(public.to_bytes());
Expand Down

0 comments on commit 7285b07

Please sign in to comment.