Support block revert operation in blockchain cache (#3401)

* support block revert operation in cache

* #[cfg(test)] -> fn unused_sink()

* swap conditions

* post-merge fix
This commit is contained in:
Svyatoslav Nikolsky
2019-10-18 18:32:13 +03:00
committed by Gavin Wood
parent b618d8f0b2
commit 35f8cd19cb
4 changed files with 175 additions and 1 deletions
+6
View File
@@ -1518,6 +1518,12 @@ impl<Block> client::backend::Backend<Block, Blake2Hasher> for Backend<Block> whe
impl<Block> client::backend::LocalBackend<Block, Blake2Hasher> for Backend<Block>
where Block: BlockT<Hash=H256> {}
/// TODO: remove me in #3201
pub fn unused_sink<Block: BlockT>(cache_tx: crate::cache::DbCacheTransaction<Block>) {
cache_tx.on_block_revert(&crate::cache::ComplexBlockId::new(Default::default(), 0.into())).unwrap();
unimplemented!()
}
#[cfg(test)]
mod tests {
use hash_db::{HashDB, EMPTY_PREFIX};