mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00

* Use inner lock in storage.
* Remove mut.
* Remove async lock for storage.
* Fix tests and warnings.
* Use spawn_blocking for storage task.
* Fix clippy.
* Finalize the new tx at last.
* Revert "Finalize the new tx at last."
This reverts commit b56ad5582d
.
* Wait for old same-root txs to finalize.
* Use async storage in miner.
* Update rust version to 1.79.0.
* Use Vec to avoid stack overflow.
* Fix unused warning.
* Fix clippy.
* Fix test warning.
* Fix test.
* fmt.
* Use async storage in pruner.
* nit.
19 lines
492 B
Rust
19 lines
492 B
Rust
use async_trait::async_trait;
|
|
use storage::log_store::MineLoadChunk;
|
|
use storage_async::Store;
|
|
|
|
#[async_trait]
|
|
pub trait PoraLoader: Send + Sync {
|
|
async fn load_sealed_data(&self, index: u64) -> Option<MineLoadChunk>;
|
|
}
|
|
|
|
#[async_trait]
|
|
impl PoraLoader for Store {
|
|
async fn load_sealed_data(&self, chunk_index: u64) -> Option<MineLoadChunk> {
|
|
match self.load_sealed_data(chunk_index).await {
|
|
Ok(Some(chunk)) => Some(chunk),
|
|
_ => None,
|
|
}
|
|
}
|
|
}
|