mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
lint: fix linter issues
This commit is contained in:
parent
bb9124a80a
commit
a10c741a26
54 changed files with 269 additions and 468 deletions
|
|
@ -352,33 +352,33 @@ func (f *FSM) updateInstantOut(ctx context.Context,
|
|||
}
|
||||
|
||||
// Infof logs an info message with the reservation hash as prefix.
|
||||
func (f *FSM) Infof(format string, args ...interface{}) {
|
||||
func (f *FSM) Infof(format string, args ...any) {
|
||||
log.Infof(
|
||||
"InstantOut %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.InstantOut.swapPreimage.Hash()},
|
||||
[]any{f.InstantOut.swapPreimage.Hash()},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
}
|
||||
|
||||
// Debugf logs a debug message with the reservation hash as prefix.
|
||||
func (f *FSM) Debugf(format string, args ...interface{}) {
|
||||
func (f *FSM) Debugf(format string, args ...any) {
|
||||
log.Debugf(
|
||||
"InstantOut %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.InstantOut.swapPreimage.Hash()},
|
||||
[]any{f.InstantOut.swapPreimage.Hash()},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
}
|
||||
|
||||
// Errorf logs an error message with the reservation hash as prefix.
|
||||
func (f *FSM) Errorf(format string, args ...interface{}) {
|
||||
func (f *FSM) Errorf(format string, args ...any) {
|
||||
log.Errorf(
|
||||
"InstantOut %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.InstantOut.swapPreimage.Hash()},
|
||||
[]any{f.InstantOut.swapPreimage.Hash()},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ func (i *InstantOut) generateHtlcSweepTx(ctx context.Context,
|
|||
// htlcWeight returns the weight for the htlc transaction.
|
||||
func htlcWeight(numInputs int) lntypes.WeightUnit {
|
||||
var weightEstimator input.TxWeightEstimator
|
||||
for i := 0; i < numInputs; i++ {
|
||||
for range numInputs {
|
||||
weightEstimator.AddTaprootKeySpendInput(
|
||||
txscript.SigHashDefault,
|
||||
)
|
||||
|
|
@ -457,7 +457,7 @@ func htlcWeight(numInputs int) lntypes.WeightUnit {
|
|||
// sweeplessSweepWeight returns the weight for the sweepless sweep transaction.
|
||||
func sweeplessSweepWeight(numInputs int) lntypes.WeightUnit {
|
||||
var weightEstimator input.TxWeightEstimator
|
||||
for i := 0; i < numInputs; i++ {
|
||||
for range numInputs {
|
||||
weightEstimator.AddTaprootKeySpendInput(
|
||||
txscript.SigHashDefault,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -259,26 +259,26 @@ func (r *FSM) updateReservation(ctx context.Context,
|
|||
}
|
||||
}
|
||||
|
||||
func (r *FSM) Infof(format string, args ...interface{}) {
|
||||
func (r *FSM) Infof(format string, args ...any) {
|
||||
log.Infof(
|
||||
"Reservation %v %x: "+format,
|
||||
append([]interface{}{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
append([]any{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
args...)...,
|
||||
)
|
||||
}
|
||||
|
||||
func (r *FSM) Debugf(format string, args ...interface{}) {
|
||||
func (r *FSM) Debugf(format string, args ...any) {
|
||||
log.Debugf(
|
||||
"Reservation %v %x: "+format,
|
||||
append([]interface{}{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
append([]any{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
args...)...,
|
||||
)
|
||||
}
|
||||
|
||||
func (r *FSM) Errorf(format string, args ...interface{}) {
|
||||
func (r *FSM) Errorf(format string, args ...any) {
|
||||
log.Errorf(
|
||||
"Reservation %v %x: "+format,
|
||||
append([]interface{}{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
append([]any{r.reservation.ProtocolVersion, r.reservation.ID},
|
||||
args...)...,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ var (
|
|||
)
|
||||
|
||||
func TestManager(t *testing.T) {
|
||||
ctxb, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctxb := t.Context()
|
||||
|
||||
testContext := newManagerTestContext(t)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue