]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Change order of where to find rpc auth
authorAlec Chen <alecchendev@gmail.com>
Thu, 5 Jan 2023 01:41:41 +0000 (19:41 -0600)
committerAlec Chen <alecchendev@gmail.com>
Thu, 5 Jan 2023 01:41:41 +0000 (19:41 -0600)
src/args.rs

index 440aa8f2a77bf4f9149b30e70f833549d94a2a88..a9d1729b3af75f9898a7e984c8403937ab5956df 100644 (file)
@@ -55,9 +55,9 @@ pub(crate) fn parse_startup_args() -> Result<LdkUserInfo, ()> {
        };
 
        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();