Struct bitcoin_harness::Bitcoind
source · pub struct Bitcoind<'c> {
pub container: Container<'c, BitcoinCore>,
pub node_url: Url,
pub wallet_name: String,
}
Fields
container: Container<'c, BitcoinCore>
node_url: Url
wallet_name: String
Implementations
sourceimpl<'c> Bitcoind<'c>
impl<'c> Bitcoind<'c>
sourcepub async fn init(&self, spendable_quantity: u32) -> Result<()>
pub async fn init(&self, spendable_quantity: u32) -> Result<()>
Create a test wallet, generate enough block to fund it and activate segwit.
Generate enough blocks to make the passed spendable_quantity
spendable.
Spawn a tokio thread to mine a new block every second.
sourcepub async fn mint(&self, address: Address, amount: Amount) -> Result<()>
pub async fn mint(&self, address: Address, amount: Amount) -> Result<()>
Send Bitcoin to the specified address, limited to the spendable bitcoin quantity.
pub fn container_id(&self) -> &str
Trait Implementations
Auto Trait Implementations
impl<'c> !RefUnwindSafe for Bitcoind<'c>
impl<'c> !Send for Bitcoind<'c>
impl<'c> !Sync for Bitcoind<'c>
impl<'c> Unpin for Bitcoind<'c>
impl<'c> !UnwindSafe for Bitcoind<'c>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more