mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 05:07:55 +00:00
Storage tracing (#3614)
* Storage tracing * Whitepsaces Co-Authored-By: Sergei Pepyakin <sergei@parity.io> * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update Cargo.lock
This commit is contained in:
@@ -110,6 +110,12 @@ impl<B: BlockT> Drop for RefTrackingState<B> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Block: BlockT> std::fmt::Debug for RefTrackingState<Block> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "Block {:?}", self.parent_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl<B: BlockT> StateBackend<Blake2Hasher> for RefTrackingState<B> {
|
||||
type Error = <DbState as StateBackend<Blake2Hasher>>::Error;
|
||||
type Transaction = <DbState as StateBackend<Blake2Hasher>>::Transaction;
|
||||
|
||||
@@ -285,6 +285,12 @@ pub struct CachingState<H: Hasher, S: StateBackend<H>, B: BlockT> {
|
||||
pub cache: CacheChanges<H, B>
|
||||
}
|
||||
|
||||
impl<H: Hasher, S: StateBackend<H>, B: BlockT> std::fmt::Debug for CachingState<H, S, B> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "Block {:?}", self.cache.parent_hash)
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: Hasher, B: BlockT> CacheChanges<H, B> {
|
||||
/// Propagate local cache into the shared cache and synchronize
|
||||
/// the shared cache with the best block state.
|
||||
|
||||
Reference in New Issue
Block a user