diff --git a/src/daemon.rs b/src/daemon.rs index 6720a0a..0e7d7a5 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -246,6 +246,10 @@ impl Daemon { .iter() .fold(Amount::from_sat(0), |acc, x| acc + x.amount); + if total_amt < FAUCET_AMT { + return Err(Error::msg("Not enought funds")); + } + let mut outputs = HashMap::new(); outputs.insert(address.to_string(), total_amt);