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,10 +1,19 @@
use ciphersuite::group::GroupEncoding;
use serai_client::validator_sets::primitives::Session;
use serai_db::{Get, DbTxn, create_db};
use serai_db::{Get, DbTxn, create_db, db_channel};
use primitives::EncodableG;
create_db! {
Processor {
ExternalKeyForSession: (session: Session) -> Vec<u8>,
ExternalKeyForSessionForSigners: <K: GroupEncoding>(session: Session) -> EncodableG<K>,
}
}
db_channel! {
Processor {
KeyToActivate: <K: GroupEncoding>() -> EncodableG<K>
}
}