From: Esraa Jbara Date: Tue, 9 Nov 2021 09:05:42 +0000 (+0200) Subject: fix tutrial to match the blog hello world X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/enum.EncodeError.html?a=commitdiff_plain;h=4b99ec5e20ceefb3cf76e3ab820ff2be7ae46fb6;p=bitcoindevkit.org fix tutrial to match the blog hello world --- diff --git a/docs/tutorials/hello-world.md b/docs/tutorials/hello-world.md index 30facc72a7..ce86ffe5a6 100644 --- a/docs/tutorials/hello-world.md +++ b/docs/tutorials/hello-world.md @@ -131,7 +131,7 @@ Right now we will not get into details of all the available options in `TxBuilde how to build transactions. We'll come back to this in a future article. ```rust -use bdk::{bitcoin::Address, FeeRate}; +use bdk::bitcoin::Address; use std::str::FromStr; // ... @@ -143,11 +143,9 @@ let faucet_address = Address::from_str("mkHS9ne12qx9pS9VojpwU5xtRd4T7X7ZUt")?; let mut tx_builder = wallet.build_tx(); tx_builder - .add_recipient(faucet_address.script_pubkey(), 0_900) - .fee_rate(FeeRate::from_sat_per_vb(5.0)) - .do_not_spend_change() + .add_recipient(faucet_address.script_pubkey(), balance / 2) .enable_rbf(); -let (mut psbt, tx_details) = tx_builder.finish()? +let (mut psbt, tx_details) = tx_builder.finish()?; println!("Transaction details: {:#?}", tx_details); ```