committed by
GitHub
parent
9f890643b9
commit
aa984ed550
@@ -279,6 +279,10 @@ fn build_send_tx(
|
||||
let mut total: u64 = coins.iter().map(|c| c.value).sum();
|
||||
let mut amount_with_fee = amount + fee;
|
||||
|
||||
if total == 0 {
|
||||
return Err(ErrorKind::NotEnoughFunds(total as u64))?;
|
||||
}
|
||||
|
||||
// Check if we need to use a change address
|
||||
if total > amount_with_fee {
|
||||
fee = tx_fee(coins.len(), 2, coins_proof_count(&coins), None);
|
||||
|
||||
Reference in New Issue
Block a user