Skip to content

Commit

Permalink
Remove ChainController's non_owning_clone method
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Sep 16, 2023
1 parent 5e1b265 commit 69de4f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ckb-bin/src/subcommand/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
Expand Down

0 comments on commit 69de4f8

Please sign in to comment.