lnd: use a default temporary static fee of 50 sat/byte for BTC
This commit is contained in:
parent
75858a604a
commit
67791755af
2
lnd.go
2
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.
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user