mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
correct tx_fee in 32bit system
This commit is contained in:
committed by
Christian Decker
parent
938addfba8
commit
b17b05b8ae
@@ -410,7 +410,7 @@ struct amount_sat amount_tx_fee(u32 fee_per_kw, size_t weight)
|
||||
|
||||
/* If this overflows, weight must be > 2^32, which is not a real tx */
|
||||
assert(!mul_overflows_u64(fee_per_kw, weight));
|
||||
fee.satoshis = fee_per_kw * weight / 1000;
|
||||
fee.satoshis = (u64)fee_per_kw * weight / 1000;
|
||||
|
||||
return fee;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user