Expand description
Bitcoind
Utility to run a regtest bitcoind process, useful in integration testing environment
use bitcoincore_rpc::RpcApi;
let bitcoind = bitcoind::BitcoinD::new("/usr/local/bin/bitcoind").unwrap();
assert_eq!(0, bitcoind.client.get_blockchain_info().unwrap().blocks);
Re-exports
pub use anyhow;
pub use bitcoincore_rpc;
pub use tempfile;
pub use which;
Structs
- Struct representing the bitcoind process with related information
- The node configuration parameters, implements a convenient Default for most common use.
- Contains all the information to connect to this node
Enums
- The DataDir struct defining the kind of data directory the node will contain. Data directory can be either persistent, or temporary.
- All the possible error in this crate
- Enum to specify p2p settings
Functions
- Provide the bitcoind executable path if a version feature has been specified
- Returns the daemon executable path if it’s provided as a feature or as
BITCOIND_EXE
env var. Returns error if none or both are set - Returns a non-used local port if available.
- Validate the specified arg if there is any unavailable or deprecated one