abort if core doesn't have enough funds

This commit is contained in:
Sosthene00 2024-04-17 08:18:33 +02:00
parent c1d1c0a4b5
commit 459756815f

View File

@ -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);