mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Inside publish (for a Serai transaction from the coordinator), use RetiredDb over latest session
Not only is this more performant, the definition of retired won't be if a newer session is active. It will be if the session has posted a slash report or the stake for that session has unlocked. Initial commit towards implementing SlashReports.
This commit is contained in:
@@ -15,7 +15,7 @@ use serai_client::{
|
||||
|
||||
use tokio::time::sleep;
|
||||
|
||||
use serai_db::{Db, MemDb, DbTxn};
|
||||
use serai_db::{Get, DbTxn, Db, MemDb};
|
||||
|
||||
use processor_messages::{
|
||||
key_gen::{self, KeyGenId},
|
||||
@@ -349,6 +349,7 @@ async fn dkg_test() {
|
||||
impl PublishSeraiTransaction for CheckPublishSetKeys {
|
||||
async fn publish_set_keys(
|
||||
&self,
|
||||
_db: &(impl Sync + Get),
|
||||
set: ValidatorSet,
|
||||
removed: Vec<SeraiAddress>,
|
||||
key_pair: KeyPair,
|
||||
|
||||
@@ -30,6 +30,7 @@ mod sync;
|
||||
impl PublishSeraiTransaction for () {
|
||||
async fn publish_set_keys(
|
||||
&self,
|
||||
_db: &(impl Sync + serai_db::Get),
|
||||
_set: ValidatorSet,
|
||||
_removed: Vec<SeraiAddress>,
|
||||
_key_pair: KeyPair,
|
||||
|
||||
Reference in New Issue
Block a user