lnd: use a default temporary static fee of 50 sat/byte for BTC

This commit is contained in:
Olaoluwa Osuntokun committed 2017-05-16 19:12:27 -07:00
1 parent 75858a604a
commit 67791755af
2 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -149,7 +149,7 @@ func lndMain() error {
signer := wc
bio := wc
fundingSigner := wc
estimator := lnwallet.StaticFeeEstimator{FeeRate: 250}
estimator := lnwallet.StaticFeeEstimator{FeeRate: 50}
// Create, and start the lnwallet, which handles the core payment
// channel logic, and exposes control via proxy state machines.
+5 -2
View File
@@ -286,14 +286,17 @@ func assertNumConnections(ctxt context.Context, t *harnessTest,
// calcStaticFee calculates appropriate fees for commitment transactions. This
// function provides a simple way to allow test balance assertions to take fee
// calculations into account.
//
// TODO(bvu): Refactor when dynamic fee estimation is added.
//
// TODO(roasbeef): can remove as fee info now exposed in listchannels?
func calcStaticFee(numHTLCs int) btcutil.Amount {
const (
commitWeight = btcutil.Amount(724)
htlcWeight = 172
feePerByte = btcutil.Amount(250 * 4)
feePerKw = btcutil.Amount(50/4) * 1000
)
return feePerByte * (commitWeight +
return feePerKw * (commitWeight +
btcutil.Amount(htlcWeight*numHTLCs)) / 1000
}