Skip to content

Commit efde1fa

Browse files
committed
chore(db): rename every ambiguous height parameter to ru height or host, where appropriate
1 parent af1347a commit efde1fa

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

crates/db/src/provider.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ where
4343
BlockNumReader::last_block_number(&self.0)
4444
}
4545

46-
fn insert_journal_hash(&self, rollup_height: u64, hash: B256) -> ProviderResult<()> {
47-
self.tx_ref().put::<JournalHashes>(rollup_height, hash)?;
46+
fn insert_journal_hash(&self, ru_height: u64, hash: B256) -> ProviderResult<()> {
47+
self.tx_ref().put::<JournalHashes>(ru_height, hash)?;
4848
Ok(())
4949
}
5050

51-
fn remove_journal_hash(&self, rollup_height: u64) -> ProviderResult<()> {
52-
self.tx_ref().delete::<JournalHashes>(rollup_height, None)?;
51+
fn remove_journal_hash(&self, ru_height: u64) -> ProviderResult<()> {
52+
self.tx_ref().delete::<JournalHashes>(ru_height, None)?;
5353
Ok(())
5454
}
5555

56-
fn get_journal_hash(&self, rollup_height: u64) -> ProviderResult<Option<B256>> {
57-
self.tx_ref().get::<JournalHashes>(rollup_height).map_err(Into::into)
56+
fn get_journal_hash(&self, ru_height: u64) -> ProviderResult<Option<B256>> {
57+
self.tx_ref().get::<JournalHashes>(ru_height).map_err(Into::into)
5858
}
5959

6060
fn latest_journal_hash(&self) -> ProviderResult<B256> {
@@ -67,9 +67,9 @@ where
6767
/// Insert an enter into the DB
6868
/// This is a signet-specific function that inserts an enter event into the
6969
/// [`SignetEvents`] table.
70-
fn insert_enter(&self, height: u64, index: u64, enter: Enter) -> ProviderResult<()> {
70+
fn insert_enter(&self, ru_height: u64, index: u64, enter: Enter) -> ProviderResult<()> {
7171
self.tx_ref()
72-
.put::<SignetEvents>(height, DbSignetEvent::Enter(index, enter))
72+
.put::<SignetEvents>(ru_height, DbSignetEvent::Enter(index, enter))
7373
.map_err(Into::into)
7474
}
7575

@@ -78,23 +78,23 @@ where
7878
/// into the [`SignetEvents`] table.
7979
fn insert_enter_token(
8080
&self,
81-
height: u64,
81+
ru_height: u64,
8282
index: u64,
8383
enter_token: EnterToken,
8484
) -> ProviderResult<()> {
85-
self.tx_ref().put::<SignetEvents>(height, DbSignetEvent::EnterToken(index, enter_token))?;
85+
self.tx_ref().put::<SignetEvents>(ru_height, DbSignetEvent::EnterToken(index, enter_token))?;
8686
Ok(())
8787
}
8888

8989
/// Insert a Transact into the DB
9090
/// This is a signet-specific function that inserts a transact event into the
9191
/// [`SignetEvents`] table.
92-
fn insert_transact(&self, height: u64, index: u64, transact: &Transact) -> ProviderResult<()> {
92+
fn insert_transact(&self, ru_height: u64, index: u64, transact: &Transact) -> ProviderResult<()> {
9393
// this is unfortunate, but probably fine because the large part is the
9494
// shared Bytes object.
9595
let t = transact.clone();
9696
self.tx_ref()
97-
.put::<SignetEvents>(height, DbSignetEvent::Transact(index, t))
97+
.put::<SignetEvents>(ru_height, DbSignetEvent::Transact(index, t))
9898
.map_err(Into::into)
9999
}
100100

0 commit comments

Comments
 (0)