From d6654575aaaad4e8a09255e4c8a6b911f072d234 Mon Sep 17 00:00:00 2001 From: yukang Date: Tue, 21 Nov 2023 10:52:16 +0800 Subject: [PATCH] fix conflict error --- rpc/src/module/subscription.rs | 1 + rpc/src/tests/mod.rs | 6 +----- rpc/src/tests/setup.rs | 7 +++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rpc/src/module/subscription.rs b/rpc/src/module/subscription.rs index 3a5c9d2c74c..3e5821d3b59 100644 --- a/rpc/src/module/subscription.rs +++ b/rpc/src/module/subscription.rs @@ -138,6 +138,7 @@ pub trait SubscriptionRpc { /// "jsonrpc": "2.0", /// "result": "0xf3" /// } + /// ``` /// /// Unsubscribe Request /// diff --git a/rpc/src/tests/mod.rs b/rpc/src/tests/mod.rs index bb55358a535..79bbd8827d1 100644 --- a/rpc/src/tests/mod.rs +++ b/rpc/src/tests/mod.rs @@ -1,10 +1,8 @@ use ckb_chain::chain::ChainController; use ckb_chain_spec::consensus::Consensus; use ckb_dao::DaoCalculator; -use ckb_jsonrpc_types::ScriptHashType; -use ckb_network::{Flags, NetworkService, NetworkState}; use ckb_reward_calculator::RewardCalculator; -use ckb_shared::{Shared, SharedBuilder, Snapshot}; +use ckb_shared::{Shared, Snapshot}; use ckb_store::ChainStore; use ckb_test_chain_utils::{always_success_cell, always_success_cellbase}; use ckb_types::{ @@ -12,8 +10,6 @@ use ckb_types::{ cell::resolve_transaction, BlockBuilder, BlockView, HeaderView, TransactionBuilder, TransactionView, }, - global::DATA_DIR, - h256, packed::{CellInput, OutPoint}, prelude::*, }; diff --git a/rpc/src/tests/setup.rs b/rpc/src/tests/setup.rs index a3eddaedd54..767f29eaa70 100644 --- a/rpc/src/tests/setup.rs +++ b/rpc/src/tests/setup.rs @@ -9,10 +9,10 @@ use ckb_chain::chain::ChainService; use ckb_chain_spec::consensus::{Consensus, ConsensusBuilder}; use ckb_chain_spec::versionbits::{ActiveMode, Deployment, DeploymentPos}; use ckb_dao_utils::genesis_dao_data; -use ckb_launcher::SharedBuilder; use ckb_network::{Flags, NetworkService, NetworkState}; use ckb_network_alert::alert_relayer::AlertRelayer; use ckb_notify::NotifyService; +use ckb_shared::SharedBuilder; use ckb_sync::SyncShared; use serde_json::json; use std::collections::HashMap; @@ -94,12 +94,11 @@ pub(crate) fn setup_rpc_test_suite(height: u64, consensus: Option) -> ChainService::new(shared.clone(), pack.take_proposal_table()).start::<&str>(None); // Start network services - let temp_dir = tempfile::tempdir().expect("create tempdir failed"); + let temp_dir = tempfile::tempdir().expect("create tmp_dir failed"); - let temp_path = temp_dir.path().to_path_buf(); let network_controller = { let network_config = NetworkConfig { - path: temp_path, + path: temp_dir.path().join("network").to_path_buf(), ping_interval_secs: 1, ping_timeout_secs: 1, connect_outbound_interval_secs: 1,