diff --git a/lnd.go b/lnd.go index ef56993a..7a0919a5 100644 --- a/lnd.go +++ b/lnd.go @@ -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. diff --git a/lnd_test.go b/lnd_test.go index 8c0fc59c..d52baaa3 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -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 }