Make doctests work

This commit is contained in:
LLFourn
2023-02-21 12:38:16 +11:00
committed by Daniela Brozzoni
parent 3baf9721ec
commit e1eb0253cf
18 changed files with 113 additions and 722 deletions

View File

@@ -2,11 +2,11 @@ pub(crate) mod tx {
use std::str::FromStr;
use bdk::{database::BatchDatabase, SignOptions, Wallet};
use bdk::{SignOptions, Wallet, persist};
use bitcoin::{Address, Transaction};
pub fn build_signed_tx<D: BatchDatabase>(
wallet: &Wallet<D>,
pub fn build_signed_tx<()>(
wallet: &Wallet<()>,
recipient_address: &str,
amount: u64,
) -> Transaction {
@@ -15,6 +15,7 @@ pub(crate) mod tx {
let to_address = Address::from_str(recipient_address).unwrap();
// Set recipient of the transaction
tx_builder.set_recipients(vec![(to_address.script_pubkey(), amount)]);