From: Alec Chen Date: Thu, 5 Jan 2023 01:41:41 +0000 (-0600) Subject: Change order of where to find rpc auth X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=46769449457834fbbbe0928e8b8d5f3dbbbdab96;p=ldk-sample Change order of where to find rpc auth --- diff --git a/src/args.rs b/src/args.rs index 440aa8f..a9d1729 100644 --- a/src/args.rs +++ b/src/args.rs @@ -55,9 +55,9 @@ pub(crate) fn parse_startup_args() -> Result { }; let (bitcoind_rpc_username, bitcoind_rpc_password) = if bitcoind_rpc_info_parts.len() == 1 { - get_rpc_auth_from_cookie(None, Some(network), None) + get_rpc_auth_from_env_vars() .or(get_rpc_auth_from_env_file(None)) - .or(get_rpc_auth_from_env_vars()) + .or(get_rpc_auth_from_cookie(None, Some(network), None)) .or({ println!("ERROR: unable to get bitcoind RPC username and password"); print_rpc_auth_help();