Convert tributary to use create_db macro (#448)

* chore: convert tributary to use create_db macro

* chore: fix fmt

* chore: break long line
This commit is contained in:
David Bell
2023-11-22 13:17:51 +04:00
committed by GitHub
parent 9ab2a2cfe0
commit 9df8c9476e
6 changed files with 142 additions and 294 deletions

View File

@@ -30,7 +30,7 @@ use tokio::{sync::mpsc, time::sleep};
use crate::{
Db,
processors::Processors,
tributary::{TributarySpec, SeraiBlockNumber, TributaryDb},
tributary::{TributarySpec, SeraiBlockNumber, KeyPairDb},
};
mod db;
@@ -305,7 +305,7 @@ async fn handle_block<D: Db, Pro: Processors>(
// Immediately ensure this key pair is accessible to the tributary, before we fire any
// events off of it
let mut txn = db.0.txn();
TributaryDb::<D>::set_key_pair(&mut txn, set, &key_pair);
KeyPairDb::set(&mut txn, set, &key_pair);
txn.commit();
handle_key_gen(&mut db.0, processors, serai, &block, set, key_pair).await?;