Skip to content

Commit

Permalink
chore: rename BlockDb to NextBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjohnbell committed Nov 21, 2023
1 parent a144d71 commit 8b78d7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coordinator/src/substrate/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ create_db!(
IntendedCosign: () -> (u64, Option<u64>),
BlockHasEvents: (block: u64) -> u8,
LatestCosignedBlock: () -> u64,
BlockDb: () -> u64,
NextBlock: () -> u64,
EventDb: (id: &[u8], index: u32) -> [u8; 0],
SessionDb: (key: &[u8]) -> Session,
BatchDb: (network: NetworkId, id: u32) -> [u8; 32]
Expand Down
4 changes: 2 additions & 2 deletions coordinator/src/substrate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ async fn handle_new_blocks<D: Db, Pro: Processors>(
.await?;
*next_block += 1;
let mut txn = db.txn();
BlockDb::set(&mut txn, next_block);
NextBlock::set(&mut txn, next_block);
txn.commit();
log::info!("handled substrate block {b}");
}
Expand All @@ -583,7 +583,7 @@ pub async fn scan_task<D: Db, Pro: Processors>(
tributary_retired: mpsc::UnboundedSender<ValidatorSet>,
) {
log::info!("scanning substrate");
let mut next_substrate_block = BlockDb::get(&db).unwrap_or_default();
let mut next_substrate_block = NextBlock::get(&db).unwrap_or_default();

let new_substrate_block_notifier = {
let serai = &serai;
Expand Down

0 comments on commit 8b78d7d

Please sign in to comment.