message: feat(freezer): skip compaction when freezer stopped
diff: @@ -305,8 +305,10 @@ impl Shared {
  let ret = freezer.freeze(threshold, get_unfrozen_block)?;
  + let stopped = freezer.stopped.load(Ordering::SeqCst);
  +
  // Wipe out frozen data
  - self.wipe_out_frozen_data(&snapshot, ret)?;
  + self.wipe_out_frozen_data(&snapshot, ret, stopped)?;
  ckb_logger::trace!("freezer finish");
  @@ -317,6 +319,7 @@ impl Shared {
  &self,
  snapshot: &Snapshot,
  frozen: BTreeMap<packed::Byte32, (BlockNumber, u32)>,
  + stopped: bool,
  ) -> Result<(), Error> {
  let mut side = BTreeMap::new();
  let mut batch = self.store.new_write_batch();
  @@ -357,10 +360,12 @@ impl Shared {
  })?;
  batch.clear()?;
  + if !stopped {
  let start = frozen.keys().min().expect("frozen empty checked");
  let end = frozen.keys().max().expect("frozen empty checked");
  self.compact_block_body(start, end);
  }
  + }
  if !side.is_empty() {
  // Wipe out side chain
  @@ -378,10 +383,12 @@ impl Shared {
  e
  })?;
  + if !stopped {
  let start = side.keys().min().expect("side empty checked");
  let end = side.keys().max().expect("side empty checked");
  self.compact_block_body(start, end);
  }
  + }
  Ok(())
  }
  