message: rpc: add validation to get_blocks_by_number params
diff: @@ -105,7 +105,21 @@ where
  count: u64,
  ) -> FutureResult<Vec<BlockView>> {
  let service = self.service.clone();
  + let config = self.config.clone();
  let fut = async move {
  + let end_block_number = match number {
  + Some(num) => num,
  + None => service.clone().main_head_header().await?.number(),
  + };
  + let max_return_num = end_block_number.min(count);
  + let block_query_max_range = config.rpc.block_query_max_range();
  + if max_return_num > block_query_max_range {
  + return Err(jsonrpc_core::Error::invalid_params(format!(
  + "would return too many blocks, please decrease count param to {}",
  + block_query_max_range
  + ))
  + .into());
  + }
  let block = service.main_blocks_by_number(number, count).await?;
  Ok(block
  