multi: update to latest fee estimation interface

This commit is contained in:
Wilmer Paulino committed 2018-08-09 17:29:52 -07:00
1 parent a63677a381
commit 9d2eeb6304
21 files changed
+150 -204

No files matched your search

+3 -4
View File
@@ -1351,7 +1351,7 @@ func createTestArbiter(t *testing.T, contractBreaches chan *ContractBreachEvent,
ba := newBreachArbiter(&BreachConfig{
CloseLink: func(_ *wire.OutPoint, _ htlcswitch.ChannelCloseType) {},
DB: db,
Estimator: &lnwallet.StaticFeeEstimator{FeeRate: 50},
Estimator: &lnwallet.StaticFeeEstimator{FeePerKW: 12500},
GenSweepScript: func() ([]byte, error) { return nil, nil },
ContractBreaches: contractBreaches,
Signer: signer,
@@ -1491,12 +1491,11 @@ func createInitChannels(revocationWindow int) (*lnwallet.LightningChannel, *lnwa
return nil, nil, nil, err
}
estimator := &lnwallet.StaticFeeEstimator{FeeRate: 50}
feePerVSize, err := estimator.EstimateFeePerVSize(1)
estimator := &lnwallet.StaticFeeEstimator{FeePerKW: 12500}
feePerKw, err := estimator.EstimateFeePerKW(1)
if err != nil {
return nil, nil, nil, err
}
feePerKw := feePerVSize.FeePerKWeight()
// TODO(roasbeef): need to factor in commit fee?
aliceCommit := channeldb.ChannelCommitment{