Expand description
§Halfin
A bitcoin node running utility for integration testing.
§Supported Implementations and Versions
§Example
use halfin::bitcoind::BitcoinD;
use halfin::utreexod::UtreexoD;
let bitcoind = BitcoinD::new().unwrap();
bitcoind.generate(10).unwrap();
assert_eq!(bitcoind.get_height().unwrap(), 10);
let utreexod = UtreexoD::new().unwrap();
utreexod.generate(10).unwrap();
assert_eq!(utreexod.get_height().unwrap(), 10);Re-exports§
Modules§
Enums§
Constants§
- NODE_
BUILDING_ MAX_ RETRIES - The maximum number of attempts at instantiating a
BitcoinD/UtreexoD. - POLL_
INTERVAL - The
Durationbetween polls forwait_for_height. - WAIT_
TIMEOUT - The timeout
Durationforwait_for_height.
Traits§
Functions§
- get_
available_ port - Ask the OS for an available port, immediately unbind and return it.
- wait_
for_ height - Poll a
Nodeuntil its chain height reachesheight, then return. - wait_
for_ height_ with_ timeout - Poll a
Nodeuntil its chain height reachesheight, then return.