File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -1520,19 +1520,7 @@ impl StoreEngine for Store {
15201520 let db = self . db . clone ( ) ;
15211521
15221522 tokio:: task:: spawn_blocking ( move || {
1523- let cf = db
1524- . cf_handle ( CF_FULLSYNC_HEADERS )
1525- . ok_or_else ( || StoreError :: Custom ( "Column family not found" . to_string ( ) ) ) ?;
1526-
1527- let mut iter = db. iterator_cf ( & cf, rocksdb:: IteratorMode :: Start ) ;
1528- let mut batch = WriteBatchWithTransaction :: default ( ) ;
1529-
1530- while let Some ( Ok ( ( key, _) ) ) = iter. next ( ) {
1531- batch. delete_cf ( & cf, key) ;
1532- }
1533-
1534- db. write ( batch)
1535- . map_err ( |e| StoreError :: Custom ( format ! ( "RocksDB batch write error: {}" , e) ) )
1523+ db. drop_cf ( CF_FULLSYNC_HEADERS ) . map_err ( StoreError :: from)
15361524 } )
15371525 . await
15381526 . map_err ( |e| StoreError :: Custom ( format ! ( "Task panicked: {}" , e) ) ) ?
You can’t perform that action at this time.
0 commit comments