mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
Test the Coordinator emits KeyGen
Mainly just a test that the full stack is properly set up and we've hit basic functioning for further testing.
This commit is contained in:
@@ -471,7 +471,12 @@ async fn boot<N: Network, D: Db>(
|
||||
if entropy.len() != 64 {
|
||||
panic!("entropy isn't the right length");
|
||||
}
|
||||
let bytes = Zeroizing::new(hex::decode(entropy).expect("entropy wasn't hex-formatted"));
|
||||
let mut bytes =
|
||||
Zeroizing::new(hex::decode(entropy).map_err(|_| ()).expect("entropy wasn't hex-formatted"));
|
||||
if bytes.len() != 32 {
|
||||
bytes.zeroize();
|
||||
panic!("entropy wasn't 32 bytes");
|
||||
}
|
||||
let mut entropy = Zeroizing::new([0; 32]);
|
||||
let entropy_mut: &mut [u8] = entropy.as_mut();
|
||||
entropy_mut.copy_from_slice(bytes.as_ref());
|
||||
|
||||
Reference in New Issue
Block a user