Handle signing batches in the processor

Duplicates the existing signer for one tailored to batch signing.
This commit is contained in:
Luke Parker
2023-04-10 11:11:46 -04:00
parent 82c34dcc76
commit d323fc8b7b
13 changed files with 576 additions and 69 deletions

View File

@@ -1,4 +1,8 @@
use std::{io, collections::HashMap};
use std::{
time::{SystemTime, Duration},
io,
collections::HashMap,
};
use async_trait::async_trait;
@@ -10,7 +14,7 @@ use frost::{
ThresholdKeys,
};
use tokio::time::{Duration, sleep};
use tokio::time::sleep;
use bitcoin_serai::{
bitcoin::{
@@ -197,6 +201,9 @@ impl BlockTrait<Bitcoin> for Block {
hash.reverse();
hash
}
fn time(&self) -> SystemTime {
SystemTime::UNIX_EPOCH + Duration::from_secs(self.header.time.into())
}
fn median_fee(&self) -> Fee {
// TODO
Fee(20)