message: fix: deadlock in get_locator_response
diff: @@ -28,7 +28,7 @@ use std::collections::{
  use std::time::{Duration, Instant};
  const FILTER_SIZE: usize = 20000;
  -const MAX_ASK_MAP_SIZE: usize = 30000;
  +const MAX_ASK_MAP_SIZE: usize = 50000;
  const MAX_ASK_SET_SIZE: usize = MAX_ASK_MAP_SIZE * 2;
  const GET_HEADERS_CACHE_SIZE: usize = 10000;
  // TODO: Need discussed
  @@ -561,9 +561,10 @@ impl<CS: ChainStore> SyncSharedState<CS> {
  pub fn get_locator_response(&self, block_number: BlockNumber, hash_stop: &H256) -> Vec<Header> {
  // Should not change chain state when get headers from it
  - let _lock = self.shared.chain_state().lock();
  + let chain_state = self.shared.chain_state().lock();
  - let tip_number = self.tip_header().number();
  + // NOTE: call `self.tip_header()` will cause deadlock
  + let tip_number = chain_state.tip_header().number();
  let max_height = cmp::min(
  block_number + 1 + MAX_HEADERS_LEN as BlockNumber,
  tip_number + 1,
  