mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Better progress reporting for stage checkpoints (#2982)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6fab79bbc2
commit
08900740bc
@ -115,6 +115,15 @@ impl<'tx, K: TransactionKind, E: EnvironmentKind> DbTx<'tx> for Tx<'tx, K, E> {
|
||||
) -> Result<<Self as DbTxGAT<'_>>::DupCursor<T>, DatabaseError> {
|
||||
self.new_cursor()
|
||||
}
|
||||
|
||||
/// Returns number of entries in the table using cheap DB stats invocation.
|
||||
fn entries<T: Table>(&self) -> Result<usize, DatabaseError> {
|
||||
Ok(self
|
||||
.inner
|
||||
.db_stat_with_dbi(self.get_dbi::<T>()?)
|
||||
.map_err(|e| DatabaseError::Stats(e.into()))?
|
||||
.entries())
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EnvironmentKind> DbTxMut<'_> for Tx<'_, RW, E> {
|
||||
|
||||
Reference in New Issue
Block a user