Use hardcoded send amount for wallet_esplora
example
This commit is contained in:
parent
b082932268
commit
b3836cb308
@ -8,6 +8,7 @@ use bdk_esplora::EsploraExt;
|
|||||||
use bdk_file_store::KeychainStore;
|
use bdk_file_store::KeychainStore;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
const SEND_AMOUNT: u64 = 5000;
|
||||||
const STOP_GAP: usize = 50;
|
const STOP_GAP: usize = 50;
|
||||||
const PARALLEL_REQUESTS: usize = 5;
|
const PARALLEL_REQUESTS: usize = 5;
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
|
|
||||||
let mut tx_builder = wallet.build_tx();
|
let mut tx_builder = wallet.build_tx();
|
||||||
tx_builder
|
tx_builder
|
||||||
.add_recipient(faucet_address.script_pubkey(), (balance.total()) / 5)
|
.add_recipient(faucet_address.script_pubkey(), SEND_AMOUNT)
|
||||||
.enable_rbf();
|
.enable_rbf();
|
||||||
|
|
||||||
let (mut psbt, _) = tx_builder.finish()?;
|
let (mut psbt, _) = tx_builder.finish()?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user