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:
Luke Parker
2024-01-05 23:36:33 -05:00
parent 1cff9b4264
commit f3429ec1ef
4 changed files with 30 additions and 22 deletions

View File

@@ -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,