mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-26 08:41:02 +02:00
rpcserver+sweep: fix linter re unused params
This commit is contained in:
parent
24fa35ec80
commit
25d82fd62b
@ -1296,7 +1296,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
|
|||||||
sweepTxPkg, err := sweep.CraftSweepAllTx(
|
sweepTxPkg, err := sweep.CraftSweepAllTx(
|
||||||
maxFeeRate, feePerKw, uint32(bestHeight), nil,
|
maxFeeRate, feePerKw, uint32(bestHeight), nil,
|
||||||
targetAddr, wallet, wallet, wallet.WalletController,
|
targetAddr, wallet, wallet, wallet.WalletController,
|
||||||
r.server.cc.FeeEstimator, r.server.cc.Signer, minConfs,
|
r.server.cc.Signer, minConfs,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -1350,8 +1350,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
|
|||||||
maxFeeRate, feePerKw, uint32(bestHeight),
|
maxFeeRate, feePerKw, uint32(bestHeight),
|
||||||
outputs, targetAddr, wallet, wallet,
|
outputs, targetAddr, wallet, wallet,
|
||||||
wallet.WalletController,
|
wallet.WalletController,
|
||||||
r.server.cc.FeeEstimator, r.server.cc.Signer,
|
r.server.cc.Signer, minConfs,
|
||||||
minConfs,
|
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -184,8 +184,7 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
|
|||||||
blockHeight uint32, deliveryAddrs []DeliveryAddr,
|
blockHeight uint32, deliveryAddrs []DeliveryAddr,
|
||||||
changeAddr btcutil.Address, coinSelectLocker CoinSelectionLocker,
|
changeAddr btcutil.Address, coinSelectLocker CoinSelectionLocker,
|
||||||
utxoSource UtxoSource, outpointLocker OutpointLocker,
|
utxoSource UtxoSource, outpointLocker OutpointLocker,
|
||||||
feeEstimator chainfee.Estimator, signer input.Signer,
|
signer input.Signer, minConfs int32) (*WalletSweepPackage, error) {
|
||||||
minConfs int32) (*WalletSweepPackage, error) {
|
|
||||||
|
|
||||||
// TODO(roasbeef): turn off ATPL as well when available?
|
// TODO(roasbeef): turn off ATPL as well when available?
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ func TestCraftSweepAllTxCoinSelectFail(t *testing.T) {
|
|||||||
utxoLocker := newMockOutpointLocker()
|
utxoLocker := newMockOutpointLocker()
|
||||||
|
|
||||||
_, err := CraftSweepAllTx(
|
_, err := CraftSweepAllTx(
|
||||||
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker,
|
||||||
nil, 0,
|
nil, 0,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ func TestCraftSweepAllTxUnknownWitnessType(t *testing.T) {
|
|||||||
utxoLocker := newMockOutpointLocker()
|
utxoLocker := newMockOutpointLocker()
|
||||||
|
|
||||||
_, err := CraftSweepAllTx(
|
_, err := CraftSweepAllTx(
|
||||||
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
|
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker,
|
||||||
nil, 0,
|
nil, 0,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -348,7 +348,6 @@ func TestCraftSweepAllTx(t *testing.T) {
|
|||||||
// First, we'll make a mock signer along with a fee estimator, We'll
|
// First, we'll make a mock signer along with a fee estimator, We'll
|
||||||
// use zero fees to we can assert a precise output value.
|
// use zero fees to we can assert a precise output value.
|
||||||
signer := &mock.DummySigner{}
|
signer := &mock.DummySigner{}
|
||||||
feeEstimator := newMockFeeEstimator(0, 0)
|
|
||||||
|
|
||||||
// For our UTXO source, we'll pass in all the UTXOs that we know of,
|
// For our UTXO source, we'll pass in all the UTXOs that we know of,
|
||||||
// other than the final one which is of an unknown witness type.
|
// other than the final one which is of an unknown witness type.
|
||||||
@ -359,7 +358,7 @@ func TestCraftSweepAllTx(t *testing.T) {
|
|||||||
|
|
||||||
sweepPkg, err := CraftSweepAllTx(
|
sweepPkg, err := CraftSweepAllTx(
|
||||||
0, 0, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
|
0, 0, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
|
||||||
utxoLocker, feeEstimator, signer, 0,
|
utxoLocker, signer, 0,
|
||||||
)
|
)
|
||||||
require.NoError(t, err, "unable to make sweep tx")
|
require.NoError(t, err, "unable to make sweep tx")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user