MCPcopy Create free account
hub / github.com/bwt-dev/bwt / get_cookie

Function get_cookie

src/config.rs:683–693  ·  view source on GitHub ↗
(config: &Config)

Source from the content-addressed store, hash-verified

681}
682
683fn get_cookie(config: &Config) -> Option<path::PathBuf> {
684 let mut dir = config.bitcoind_dir.clone().or_else(bitcoind_default_dir)?;
685 match config.network {
686 Network::Bitcoin => (),
687 Network::Testnet => dir.push("testnet3"),
688 Network::Regtest => dir.push("regtest"),
689 Network::Signet => dir.push("signet"),
690 }
691 let cookie = dir.join(".cookie");
692 iif!(cookie.exists(), Some(cookie), None)
693}
694
695#[cfg(feature = "dirs")]
696fn bitcoind_default_dir() -> Option<path::PathBuf> {

Callers 1

bitcoind_authMethod · 0.85

Calls 2

pushMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected