From 69de4f8e35b6a55454f2fb779fd31e1a8e6ac646 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 16 Sep 2023 14:01:57 +0800 Subject: [PATCH] Remove `ChainController`'s `non_owning_clone` method --- chain/src/chain.rs | 9 --------- ckb-bin/src/subcommand/run.rs | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/chain/src/chain.rs b/chain/src/chain.rs index bcef1bfc12..c95ad4853c 100644 --- a/chain/src/chain.rs +++ b/chain/src/chain.rs @@ -99,15 +99,6 @@ impl ChainController { .into()) }) } - - /// Since a non-owning reference does not count towards ownership, - /// it will not prevent the value stored in the allocation from being dropped - pub fn non_owning_clone(&self) -> Self { - ChainController { - truncate_sender: self.truncate_sender.clone(), - process_block_sender: self.process_block_sender.clone(), - } - } } /// The struct represent fork diff --git a/ckb-bin/src/subcommand/run.rs b/ckb-bin/src/subcommand/run.rs index 3a7f2d326d..fd6355af33 100644 --- a/ckb-bin/src/subcommand/run.rs +++ b/ckb-bin/src/subcommand/run.rs @@ -47,7 +47,7 @@ pub fn run(args: RunArgs, version: Version, async_handle: Handle) -> Result<(), let (network_controller, _rpc_server) = launcher.start_network_and_rpc( &shared, - chain_controller.non_owning_clone(), + chain_controller.clone(), miner_enable, pack.take_relay_tx_receiver(), );