lnwallet: properly use in KB, not KiB to convert to sat/byte for bitcoind estimator

In this commit, we fix an existing bug. The fee estimation within
bitcoind is based on fee/KB (1000), not fee/KiB (1024).

Pointed out by @dabura667.
This commit is contained in:
Olaoluwa Osuntokun 2018-01-28 14:53:53 -08:00
parent 47dc2d3b70
commit 63fe8aec5b
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -331,9 +331,9 @@ func (b *BitcoindFeeEstimator) fetchEstimatePerByte(confTarget uint32) (btcutil.
}
// The value returned is expressed in fees per KB, while we want
// fee-per-byte, so we'll divide by 1024 to map to satoshis-per-byte
// fee-per-byte, so we'll divide by 1000 to map to satoshis-per-byte
// before returning the estimate.
satPerByte := satPerKB / 1024
satPerByte := satPerKB / 1000
walletLog.Debugf("Returning %v sat/byte for conf target of %v",
int64(satPerByte), confTarget)