From b17b05b8ae271d097d39ff24840d17f1f47e88be Mon Sep 17 00:00:00 2001 From: arowser Date: Mon, 25 Mar 2019 18:06:16 +0800 Subject: [PATCH] correct tx_fee in 32bit system --- common/amount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/amount.c b/common/amount.c index e0e59c761..786d56db4 100644 --- a/common/amount.c +++ b/common/amount.c @@ -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; }