Skip to content

Commit

Permalink
rpcserver+sweep: fix linter re unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Aug 22, 2023
1 parent feb0d14 commit 9fc40ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
sweepTxPkg, err := sweep.CraftSweepAllTx(
maxFeeRate, feePerKw, uint32(bestHeight), nil,
targetAddr, wallet, wallet, wallet.WalletController,
r.server.cc.FeeEstimator, r.server.cc.Signer, minConfs,
r.server.cc.Signer, minConfs,
)
if err != nil {
return nil, err
Expand Down Expand Up @@ -1350,8 +1350,7 @@ func (r *rpcServer) SendCoins(ctx context.Context,
maxFeeRate, feePerKw, uint32(bestHeight),
outputs, targetAddr, wallet, wallet,
wallet.WalletController,
r.server.cc.FeeEstimator, r.server.cc.Signer,
minConfs,
r.server.cc.Signer, minConfs,
)
if err != nil {
return nil, err
Expand Down
3 changes: 1 addition & 2 deletions sweep/walletsweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ func CraftSweepAllTx(feeRate, maxFeeRate chainfee.SatPerKWeight,
blockHeight uint32, deliveryAddrs []DeliveryAddr,
changeAddr btcutil.Address, coinSelectLocker CoinSelectionLocker,
utxoSource UtxoSource, outpointLocker OutpointLocker,
feeEstimator chainfee.Estimator, signer input.Signer,
minConfs int32) (*WalletSweepPackage, error) {
signer input.Signer, minConfs int32) (*WalletSweepPackage, error) {

// TODO(roasbeef): turn off ATPL as well when available?

Expand Down
7 changes: 3 additions & 4 deletions sweep/walletsweep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func TestCraftSweepAllTxCoinSelectFail(t *testing.T) {
utxoLocker := newMockOutpointLocker()

_, err := CraftSweepAllTx(
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker,
nil, 0,
)

Expand All @@ -323,7 +323,7 @@ func TestCraftSweepAllTxUnknownWitnessType(t *testing.T) {
utxoLocker := newMockOutpointLocker()

_, err := CraftSweepAllTx(
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker, nil,
0, 0, 10, nil, nil, coinSelectLocker, utxoSource, utxoLocker,
nil, 0,
)

Expand All @@ -348,7 +348,6 @@ func TestCraftSweepAllTx(t *testing.T) {
// 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.
signer := &mock.DummySigner{}
feeEstimator := newMockFeeEstimator(0, 0)

// 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.
Expand All @@ -359,7 +358,7 @@ func TestCraftSweepAllTx(t *testing.T) {

sweepPkg, err := CraftSweepAllTx(
0, 0, 10, nil, deliveryAddr, coinSelectLocker, utxoSource,
utxoLocker, feeEstimator, signer, 0,
utxoLocker, signer, 0,
)
require.NoError(t, err, "unable to make sweep tx")

Expand Down

0 comments on commit 9fc40ed

Please sign in to comment.