You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+67-6Lines changed: 67 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,9 @@ pub enum Error {
104
104
EarlyExit(ExitStatus),
105
105
/// Returned when both tmpdir and staticdir is specified in `Conf` options
106
106
BothDirsSpecified,
107
+
/// Returned when -rpcuser and/or -rpcpassword is used in `Conf` args
108
+
/// It will soon be deprecated, please use -rpcauth instead
109
+
RpcUserAndPasswordUsed,
107
110
}
108
111
109
112
impl fmt::DebugforError{
@@ -116,7 +119,8 @@ impl fmt::Debug for Error {
116
119
Error::NoBitcoindExecutableFound => write!(f,"`bitcoind` executable is required, provide it with one of the following: set env var `BITCOIND_EXE` or use a feature like \"22_0\" or have `bitcoind` executable in the `PATH`"),
117
120
Error::BothFeatureAndEnvVar => write!(f,"Called a method requiring env var `BITCOIND_EXE` or a feature to be set, but both are set"),
118
121
Error::EarlyExit(e) => write!(f,"The bitcoind process terminated early with exit code {}", e),
119
-
Error::BothDirsSpecified => write!(f,"tempdir and staticdir cannot be enabled at same time in configuration options")
122
+
Error::BothDirsSpecified => write!(f,"tempdir and staticdir cannot be enabled at same time in configuration options"),
123
+
Error::RpcUserAndPasswordUsed => write!(f,"`-rpcuser` and `-rpcpassword` cannot be used, it will be deprecated soon and it's recommended to use `-rpcauth` instead which works alongside with the default cookie authentication")
120
124
}
121
125
}
122
126
}
@@ -131,6 +135,8 @@ impl std::error::Error for Error {}
// rpcauth generated with [rpcauth.py](https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py)
657
+
// this could be also added to bitcoind, example: [RpcAuth](https://github.com/testcontainers/testcontainers-rs/blob/dev/testcontainers/src/images/coblox_bitcoincore.rs#L39-L91)
0 commit comments