Continue filling out main loop

Adds generics to the db_channel macro, fixes the bug where it needed at least
one key.
This commit is contained in:
Luke Parker
2024-09-11 08:58:58 -04:00
parent 723f529659
commit 59fa49f750
7 changed files with 186 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
use ciphersuite::{group::GroupEncoding, Ciphersuite, Secp256k1};
use frost::ThresholdKeys;
use crate::scan::scanner;
use crate::{primitives::x_coord_to_even_point, scan::scanner};
pub(crate) struct KeyGenParams;
impl key_gen::KeyGenParams for KeyGenParams {
@@ -21,4 +21,8 @@ impl key_gen::KeyGenParams for KeyGenParams {
// Skip the parity encoding as we know this key is even
key[1 ..].to_vec()
}
fn decode_key(key: &[u8]) -> Option<<Self::ExternalNetworkCurve as Ciphersuite>::G> {
x_coord_to_even_point(key)
}
}