Skip to content

Commit 442b24c

Browse files
committed
f Use saturating_add
1 parent 100df55 commit 442b24c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ where
364364
e
365365
})?
366366
.to_sat();
367-
if spendable_amount_sats < amount_sats + tx_fee_sats {
367+
if spendable_amount_sats < amount_sats.saturating_add(tx_fee_sats) {
368368
log_error!(self.logger,
369369
"Unable to send payment due to insufficient funds. Available: {}sats, Required: {}sats + {}sats fee",
370370
spendable_amount_sats,

0 commit comments

Comments
 (0)