mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 05:29:25 +00:00
Have the coordinator task publish Batches
This commit is contained in:
@@ -6,7 +6,7 @@ use frost::dkg::ThresholdKeys;
|
||||
use serai_validator_sets_primitives::Session;
|
||||
use serai_in_instructions_primitives::{SignedBatch, batch_message};
|
||||
|
||||
use serai_db::{DbTxn, Db};
|
||||
use serai_db::{Get, DbTxn, Db};
|
||||
|
||||
use messages::sign::VariantSignId;
|
||||
|
||||
@@ -23,6 +23,14 @@ use crate::{
|
||||
mod db;
|
||||
use db::*;
|
||||
|
||||
pub(crate) fn last_acknowledged_batch(getter: &impl Get) -> Option<u32> {
|
||||
LastAcknowledgedBatch::get(getter)
|
||||
}
|
||||
|
||||
pub(crate) fn signed_batch(getter: &impl Get, id: u32) -> Option<SignedBatch> {
|
||||
SignedBatches::get(getter, id)
|
||||
}
|
||||
|
||||
// Fetches batches to sign and signs them.
|
||||
pub(crate) struct BatchSignerTask<D: Db, E: GroupEncoding> {
|
||||
db: D,
|
||||
|
||||
Reference in New Issue
Block a user