Skip to content

Commit bafbfde

Browse files
committed
crc: makes create_rpc_client_unchecked idiomatic
1 parent 51ee551 commit bafbfde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stacks-node/src/burnchains/bitcoin_regtest_controller.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,10 @@ impl BitcoinRegtestController {
484484
/// tries to instantiate it or **panics** otherwise.
485485
/// If the node is **not** a miner, returns None (e.g. follower node).
486486
fn create_rpc_client_unchecked(config: &Config) -> Option<BitcoinRpcClient> {
487-
config.node.miner.then_some(
487+
config.node.miner.then(|| {
488488
BitcoinRpcClient::from_stx_config(&config)
489-
.expect("unable to instantiate the RPC client for miner node!"),
490-
)
489+
.expect("unable to instantiate the RPC client for miner node!")
490+
})
491491
}
492492

493493
/// Attempt to get a reference to the underlying [`BitcoinRpcClient`].

0 commit comments

Comments
 (0)