Use hardcoded send amount for wallet_esplora example

This commit is contained in:
志宇 2023-03-07 10:47:13 +13:00
parent b082932268
commit b3836cb308
No known key found for this signature in database
GPG Key ID: F6345C9837C2BDE8

View File

@ -8,6 +8,7 @@ use bdk_esplora::EsploraExt;
use bdk_file_store::KeychainStore;
use std::str::FromStr;
const SEND_AMOUNT: u64 = 5000;
const STOP_GAP: usize = 50;
const PARALLEL_REQUESTS: usize = 5;
@ -58,7 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut tx_builder = wallet.build_tx();
tx_builder
.add_recipient(faucet_address.script_pubkey(), (balance.total()) / 5)
.add_recipient(faucet_address.script_pubkey(), SEND_AMOUNT)
.enable_rbf();
let (mut psbt, _) = tx_builder.finish()?;