mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
Merge pull request #1078 from hieblmi/static-fixes
staticaddr: various fixes
This commit is contained in:
commit
8a1f34acb8
83 changed files with 1007 additions and 939 deletions
|
|
@ -442,10 +442,7 @@ func (s *Client) Run(ctx context.Context, statusChan chan<- SwapInfo) error {
|
|||
}
|
||||
|
||||
// Start goroutine to deliver all pending swaps to the main loop.
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
|
||||
s.wg.Go(func() {
|
||||
s.resumeSwaps(mainCtx, pendingLoopOutSwaps, pendingLoopInSwaps)
|
||||
|
||||
// Signal that new requests can be accepted. Otherwise, the new
|
||||
|
|
@ -453,7 +450,7 @@ func (s *Client) Run(ctx context.Context, statusChan chan<- SwapInfo) error {
|
|||
// this goroutine as being a swap that needs to be resumed.
|
||||
// Resulting in two goroutines executing the same swap.
|
||||
close(s.resumeReady)
|
||||
}()
|
||||
})
|
||||
|
||||
// Main event loop.
|
||||
err = s.executor.run(mainCtx, statusChan, s.abandonChans)
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ func instantOut(ctx context.Context, cmd *cli.Command) error {
|
|||
// element.
|
||||
var outgoingChanSet []uint64
|
||||
if cmd.IsSet("channel") {
|
||||
chanStrings := strings.Split(cmd.String("channel"), ",")
|
||||
for _, chanString := range chanStrings {
|
||||
for chanString := range strings.SplitSeq(cmd.String("channel"), ",") {
|
||||
chanID, err := strconv.ParseUint(chanString, 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing channel id "+
|
||||
|
|
|
|||
|
|
@ -159,8 +159,7 @@ func loopOut(ctx context.Context, cmd *cli.Command) error {
|
|||
return fmt.Errorf("channel flag is not supported when " +
|
||||
"looping out assets")
|
||||
}
|
||||
chanStrings := strings.Split(cmd.String("channel"), ",")
|
||||
for _, chanString := range chanStrings {
|
||||
for chanString := range strings.SplitSeq(cmd.String("channel"), ",") {
|
||||
chanID, err := strconv.ParseUint(chanString, 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing channel id "+
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const (
|
|||
envVarMacaroonPath = "LOOPCLI_MACAROONPATH"
|
||||
)
|
||||
|
||||
func printJSON(resp interface{}) {
|
||||
func printJSON(resp any) {
|
||||
b, err := json.Marshal(resp)
|
||||
if err != nil {
|
||||
fatal(err)
|
||||
|
|
|
|||
|
|
@ -77,8 +77,7 @@ func listSwaps(ctx context.Context, cmd *cli.Command) error {
|
|||
// element.
|
||||
var outgoingChanSet []uint64
|
||||
if cmd.IsSet(channelFlag.Name) {
|
||||
chanStrings := strings.Split(cmd.String(channelFlag.Name), ",")
|
||||
for _, chanString := range chanStrings {
|
||||
for chanString := range strings.SplitSeq(cmd.String(channelFlag.Name), ",") {
|
||||
chanID, err := strconv.ParseUint(chanString, 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing channel id "+
|
||||
|
|
|
|||
14
executor.go
14
executor.go
|
|
@ -123,10 +123,7 @@ func (s *executor) run(mainCtx context.Context,
|
|||
|
||||
batcherErrChan = make(chan error, 1)
|
||||
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
|
||||
s.wg.Go(func() {
|
||||
err := s.batcher.Run(mainCtx)
|
||||
if err != nil && !errors.Is(err, context.Canceled) {
|
||||
select {
|
||||
|
|
@ -134,7 +131,7 @@ func (s *executor) run(mainCtx context.Context,
|
|||
case <-mainCtx.Done():
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Start main event loop.
|
||||
log.Infof("Starting event loop at height %v", height)
|
||||
|
|
@ -164,10 +161,7 @@ func (s *executor) run(mainCtx context.Context,
|
|||
swapID := nextSwapID
|
||||
blockEpochQueues[swapID] = queue
|
||||
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
|
||||
s.wg.Go(func() {
|
||||
err := newSwap.execute(mainCtx, &executeConfig{
|
||||
statusChan: statusChan,
|
||||
sweeper: s.sweeper,
|
||||
|
|
@ -200,7 +194,7 @@ func (s *executor) run(mainCtx context.Context,
|
|||
case swapDoneChan <- swapID:
|
||||
case <-mainCtx.Done():
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
nextSwapID++
|
||||
|
||||
|
|
|
|||
20
fsm/fsm.go
20
fsm/fsm.go
|
|
@ -7,14 +7,22 @@ import (
|
|||
"sync"
|
||||
)
|
||||
|
||||
// ErrEventRejected is the error returned when the state machine cannot process
|
||||
// an event in the state that it is in.
|
||||
var (
|
||||
ErrEventRejected = errors.New("event rejected")
|
||||
// ErrEventRejected is the error returned when the state machine cannot
|
||||
// process an event in the state that it is in.
|
||||
ErrEventRejected = errors.New("event rejected")
|
||||
|
||||
// ErrWaitForStateTimedOut is returned when waiting for state times out.
|
||||
ErrWaitForStateTimedOut = errors.New(
|
||||
"timed out while waiting for event",
|
||||
)
|
||||
ErrInvalidContextType = errors.New("invalid context")
|
||||
|
||||
// ErrInvalidContextType is returned when an invalid context type is
|
||||
// passed.
|
||||
ErrInvalidContextType = errors.New("invalid context")
|
||||
|
||||
// ErrWaitingForStateEarlyAbortError is returned when waiting for state
|
||||
// is aborted early.
|
||||
ErrWaitingForStateEarlyAbortError = errors.New(
|
||||
"waiting for state early abort",
|
||||
)
|
||||
|
|
@ -43,7 +51,7 @@ type EventType string
|
|||
|
||||
// EventContext represents the context to be passed to the action
|
||||
// implementation.
|
||||
type EventContext interface{}
|
||||
type EventContext = any
|
||||
|
||||
// Action represents the action to be executed in a given state.
|
||||
type Action func(ctx context.Context, eventCtx EventContext) EventType
|
||||
|
|
@ -91,7 +99,7 @@ type Observer interface {
|
|||
|
||||
// StateMachine represents the state machine.
|
||||
type StateMachine struct {
|
||||
// Context represents the state machine context.
|
||||
// States represents the state machine states.
|
||||
States States
|
||||
|
||||
// ActionEntryFunc is a function that is called before an action is
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -219,6 +219,8 @@ replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-d
|
|||
// did not yet make it into the upstream repository.
|
||||
replace github.com/golang-migrate/migrate/v4 => github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2
|
||||
|
||||
replace lukechampine.com/uint128 => github.com/lukechampine/uint128 v1.2.0
|
||||
|
||||
replace github.com/lightninglabs/loop/swapserverrpc => ./swapserverrpc
|
||||
|
||||
replace github.com/lightninglabs/loop/looprpc => ./looprpc
|
||||
|
|
|
|||
3
go.sum
3
go.sum
|
|
@ -1152,6 +1152,7 @@ github.com/lightningnetwork/lnd/tor v1.1.6/go.mod h1:qSRB8llhAK+a6kaTPWOLLXSZc6H
|
|||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw=
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY=
|
||||
github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA=
|
||||
github.com/lukechampine/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
|
||||
github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
|
||||
|
|
@ -2143,8 +2144,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
|
|||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
|
||||
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
|
||||
modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
|
||||
modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
|
||||
|
|
|
|||
|
|
@ -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...,
|
||||
)...,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ func (i *InstantOut) createMusig2Session(ctx context.Context,
|
|||
return musig2Sessions, clientNonces, nil
|
||||
}
|
||||
|
||||
// getInputReservation returns the input reservation for the instant out.
|
||||
// getInputReservations returns the input reservations for the instant out.
|
||||
func (i *InstantOut) getInputReservations() (InputReservations, error) {
|
||||
if len(i.Reservations) == 0 {
|
||||
return nil, errors.New("no reservations")
|
||||
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -313,7 +313,8 @@ func TestSubscribeToConfirmationAction(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// AsyncWaitForExpiredOrSweptAction tests the AsyncWaitForExpiredOrSweptAction
|
||||
// TestAsyncWaitForExpiredOrSweptAction tests the
|
||||
// AsyncWaitForExpiredOrSweptAction
|
||||
// of the reservation state machine.
|
||||
func TestAsyncWaitForExpiredOrSweptAction(t *testing.T) {
|
||||
tests := []struct {
|
||||
|
|
@ -375,7 +376,7 @@ func TestAsyncWaitForExpiredOrSweptAction(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TesthandleSubcriptions tests the handleSubcriptions function of the
|
||||
// TestHandleSubcriptions tests the handleSubcriptions function of the
|
||||
// reservation state machine.
|
||||
func TestHandleSubcriptions(t *testing.T) {
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type OutRequest struct {
|
|||
// include the swap and miner fee.
|
||||
Amount btcutil.Amount
|
||||
|
||||
// Destination address for the swap.
|
||||
// DestAddr is the destination address for the swap.
|
||||
DestAddr btcutil.Address
|
||||
|
||||
// IsExternalAddr indicates whether the provided destination address
|
||||
|
|
@ -428,8 +428,8 @@ type LoopInQuote struct {
|
|||
// sweep the htlc.
|
||||
MinerFee btcutil.Amount
|
||||
|
||||
// Time lock delta relative to current block height that swap server
|
||||
// will accept on the swap initiation call.
|
||||
// CltvDelta is the time lock delta relative to current block height
|
||||
// that the swap server will accept on the swap initiation call.
|
||||
CltvDelta int32
|
||||
}
|
||||
|
||||
|
|
@ -533,7 +533,7 @@ type ProbeRequest struct {
|
|||
// LastHop is the last hop along the route.
|
||||
LastHop *route.Vertex
|
||||
|
||||
// Optional hop hints.
|
||||
// RouteHints are optional hop hints.
|
||||
RouteHints [][]zpay32.HopHint
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ func (c *autoloopTestCtx) autoloop(step *autoloopStep) {
|
|||
amt2expected[expected.request.Amount] = expected
|
||||
}
|
||||
|
||||
for i := 0; i < len(step.quotesIn); i++ {
|
||||
for range len(step.quotesIn) {
|
||||
request := <-c.quoteRequestIn
|
||||
|
||||
// Get the expected item, using amount as a key.
|
||||
|
|
@ -459,7 +459,7 @@ func (c *autoloopTestCtx) matchLoopOuts(swaps []loopOutRequestResp,
|
|||
|
||||
length := len(swapsCopy)
|
||||
|
||||
for i := 0; i < length; i++ {
|
||||
for range length {
|
||||
actual := <-c.outRequest
|
||||
|
||||
if !keepDestAddr {
|
||||
|
|
@ -494,7 +494,7 @@ func (c *autoloopTestCtx) matchLoopIns(
|
|||
swapsCopy := make([]loopInRequestResp, len(swaps))
|
||||
copy(swapsCopy, swaps)
|
||||
|
||||
for i := 0; i < len(swapsCopy); i++ {
|
||||
for range len(swapsCopy) {
|
||||
actual := <-c.inRequest
|
||||
|
||||
inner:
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ const (
|
|||
// 1%.
|
||||
defaultRoutingFeePPM = 10000
|
||||
|
||||
// defaultRoutingFeePPM is the default limit we place on routing fees
|
||||
// for the prepay invoice, expressed as parts per million of prepay
|
||||
// defaultPrepayRoutingFeePPM is the default limit we place on routing
|
||||
// fees for the prepay invoice, expressed as parts per million of prepay
|
||||
// volume, 0.5%.
|
||||
defaultPrepayRoutingFeePPM = 5000
|
||||
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ func (m *Manager) SetParameters(ctx context.Context,
|
|||
return m.saveParams(ctx, req)
|
||||
}
|
||||
|
||||
// SetParameters updates our current set of parameters if the new parameters
|
||||
// setParameters updates our current set of parameters if the new parameters
|
||||
// provided are valid.
|
||||
func (m *Manager) setParameters(ctx context.Context,
|
||||
params Parameters) error {
|
||||
|
|
@ -622,9 +622,7 @@ func (m *Manager) dispatchBestEasyAutoloopSwap(ctx context.Context) error {
|
|||
// Calculate the amount that we want to loop out. If it exceeds the max
|
||||
// allowed clamp it to max.
|
||||
amount := localTotal - m.params.EasyAutoloopTarget
|
||||
if amount > restrictions.Maximum {
|
||||
amount = restrictions.Maximum
|
||||
}
|
||||
amount = min(amount, restrictions.Maximum)
|
||||
|
||||
// If the amount we want to loop out is less than the minimum we can't
|
||||
// proceed with a swap, so we return early.
|
||||
|
|
@ -1516,7 +1514,7 @@ func (m *Manager) dispatchStickyLoopOut(ctx context.Context,
|
|||
m.activeStickyLock.Unlock()
|
||||
}()
|
||||
|
||||
for i := 0; i < int(retryCount); i++ {
|
||||
for range int(retryCount) {
|
||||
// Dispatch the swap.
|
||||
swap, err := m.cfg.LoopOut(ctx, &out)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ func rpcToRule(rule *clientrpc.LiquidityRule) (*SwapRule, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// rpcToParameters takes a `LiquidityParameters` and creates a `Parameters`
|
||||
// RpcToParameters takes a `LiquidityParameters` and creates a `Parameters`
|
||||
// from it.
|
||||
func RpcToParameters(req *clientrpc.LiquidityParameters) (*Parameters,
|
||||
error) {
|
||||
|
|
|
|||
105
loopd/daemon.go
105
loopd/daemon.go
|
|
@ -5,6 +5,7 @@ import (
|
|||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
|
@ -335,10 +336,7 @@ func (d *Daemon) startWebServers() error {
|
|||
ReadHeaderTimeout: 5 * time.Second,
|
||||
}
|
||||
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("REST proxy listening on %s",
|
||||
d.restListener.Addr())
|
||||
err := d.restServer.Serve(d.restListener)
|
||||
|
|
@ -351,16 +349,13 @@ func (d *Daemon) startWebServers() error {
|
|||
// channel is sufficiently buffered.
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
} else {
|
||||
infof("REST proxy disabled")
|
||||
}
|
||||
|
||||
// Start the grpc server.
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("RPC server listening on %s", d.grpcListener.Addr())
|
||||
err = d.grpcServer.Serve(d.grpcListener)
|
||||
if err != nil && !errors.Is(err, grpc.ErrServerStopped) {
|
||||
|
|
@ -370,7 +365,7 @@ func (d *Daemon) startWebServers() error {
|
|||
// channel is sufficiently buffered.
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -511,9 +506,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Add our debug permissions to our main set of required permissions
|
||||
// if compiled in.
|
||||
for endpoint, perm := range debugRequiredPermissions {
|
||||
loop_looprpc.RequiredPermissions[endpoint] = perm
|
||||
}
|
||||
maps.Copy(loop_looprpc.RequiredPermissions, debugRequiredPermissions)
|
||||
|
||||
rks, db, err := lndclient.NewBoltMacaroonStore(
|
||||
d.cfg.DataDir, "macaroons.db", loopdb.DefaultLoopDBTimeout,
|
||||
|
|
@ -569,17 +562,14 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
}
|
||||
notificationManager := notifications.NewManager(notificationCfg)
|
||||
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting notification manager")
|
||||
err := notificationManager.Run(d.mainCtx)
|
||||
if err != nil {
|
||||
d.internalErrChan <- err
|
||||
errorf("Notification manager stopped: %v", err)
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
var (
|
||||
staticAddressManager *address.Manager
|
||||
|
|
@ -610,12 +600,9 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
// Static address deposit manager setup.
|
||||
depositStore := deposit.NewSqlStore(baseDb)
|
||||
depoCfg := &deposit.ManagerConfig{
|
||||
AddressClient: staticAddressClient,
|
||||
AddressManager: staticAddressManager,
|
||||
SwapClient: swapClient,
|
||||
Store: depositStore,
|
||||
WalletKit: d.lnd.WalletKit,
|
||||
ChainParams: d.lnd.ChainParams,
|
||||
ChainNotifier: d.lnd.ChainNotifier,
|
||||
Signer: d.lnd.Signer,
|
||||
}
|
||||
|
|
@ -646,14 +633,10 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Static address deposit open channel manager setup.
|
||||
openChannelCfg := &openchannel.Config{
|
||||
Server: staticAddressClient,
|
||||
AddressManager: staticAddressManager,
|
||||
DepositManager: depositManager,
|
||||
WithdrawalManager: withdrawalManager,
|
||||
WalletKit: d.lnd.WalletKit,
|
||||
ChainParams: d.lnd.ChainParams,
|
||||
ChainNotifier: d.lnd.ChainNotifier,
|
||||
Signer: d.lnd.Signer,
|
||||
LightningClient: d.lnd.Client,
|
||||
}
|
||||
openChannelManager = openchannel.NewManager(openChannelCfg)
|
||||
|
|
@ -759,7 +742,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
liquidityMgr: getLiquidityManager(swapClient),
|
||||
lnd: &d.lnd.LndServices,
|
||||
swaps: make(map[lntypes.Hash]loop.SwapInfo),
|
||||
subscribers: make(map[int]chan<- interface{}),
|
||||
subscribers: make(map[int]chan<- any),
|
||||
statusChan: make(chan loop.SwapInfo),
|
||||
mainCtx: d.mainCtx,
|
||||
reservationManager: reservationManager,
|
||||
|
|
@ -799,10 +782,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
}
|
||||
|
||||
// Start the swap client itself.
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting swap client")
|
||||
err := d.impl.Run(d.mainCtx, d.statusChan)
|
||||
if err != nil {
|
||||
|
|
@ -813,21 +793,15 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
d.internalErrChan <- err
|
||||
}
|
||||
infof("Swap client stopped")
|
||||
}()
|
||||
})
|
||||
|
||||
// Start a goroutine that broadcasts swap updates to clients.
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Waiting for updates")
|
||||
d.processStatusUpdates(d.mainCtx)
|
||||
}()
|
||||
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
})
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting liquidity manager")
|
||||
err := d.liquidityMgr.Run(d.mainCtx)
|
||||
if err != nil && !errors.Is(err, context.Canceled) {
|
||||
|
|
@ -835,17 +809,14 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
}
|
||||
|
||||
infof("Liquidity manager stopped")
|
||||
}()
|
||||
})
|
||||
|
||||
initManagerTimeout := 10 * time.Second
|
||||
|
||||
// Start the reservation manager.
|
||||
if d.reservationManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting reservation manager")
|
||||
defer infof("Reservation manager stopped")
|
||||
|
||||
|
|
@ -855,7 +826,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
if err != nil && !errors.Is(err, context.Canceled) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the reservation server to be ready before starting
|
||||
// the grpc server.
|
||||
|
|
@ -875,11 +846,8 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Start the instant out manager.
|
||||
if d.instantOutManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting instantout manager")
|
||||
defer infof("Instantout manager stopped")
|
||||
|
||||
|
|
@ -887,7 +855,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
if err != nil && !errors.Is(err, context.Canceled) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the instantout server to be ready before starting
|
||||
// the grpc server.
|
||||
|
|
@ -907,11 +875,8 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Start the static address manager.
|
||||
if staticAddressManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting static address manager...")
|
||||
defer infof("Static address manager stopped")
|
||||
|
||||
|
|
@ -919,7 +884,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
if shouldReportManagerErr(err) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the static address manager to be ready before
|
||||
// starting the grpc server.
|
||||
|
|
@ -939,11 +904,8 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Start the static address deposit manager.
|
||||
if depositManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting static address deposit manager...")
|
||||
defer infof("Static address deposit manager stopped")
|
||||
|
||||
|
|
@ -951,7 +913,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
if shouldReportManagerErr(err) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the static address manager to be ready before
|
||||
// starting the grpc server.
|
||||
|
|
@ -971,11 +933,8 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
|
||||
// Start the static address deposit withdrawal manager.
|
||||
if withdrawalManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting static address withdrawal manager...")
|
||||
defer infof("Static address withdrawal manager stopped")
|
||||
|
||||
|
|
@ -983,7 +942,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
if shouldReportManagerErr(err) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// We need a higher timeout here, because withdrawalManager
|
||||
// publishes transactions and each PublishTransaction call can
|
||||
|
|
@ -1007,33 +966,27 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
}
|
||||
// Start the static address open channel manager.
|
||||
if openChannelManager != nil {
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting static address open channel manager")
|
||||
err := openChannelManager.Run(d.mainCtx)
|
||||
if err != nil && !errors.Is(context.Canceled, err) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
infof("Static address open channel manager stopped")
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
// Start the static address loop-in manager.
|
||||
if staticLoopInManager != nil {
|
||||
d.wg.Add(1)
|
||||
initChan := make(chan struct{})
|
||||
go func() {
|
||||
defer d.wg.Done()
|
||||
|
||||
d.wg.Go(func() {
|
||||
infof("Starting static address loop-in manager...")
|
||||
defer infof("Static address loop-in manager stopped")
|
||||
err := staticLoopInManager.Run(d.mainCtx, initChan)
|
||||
if shouldReportManagerErr(err) {
|
||||
d.internalErrChan <- err
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the static address loop-in manager to be ready before
|
||||
// starting the grpc server.
|
||||
|
|
|
|||
|
|
@ -39,22 +39,22 @@ func setLogger(logger btclog.Logger) {
|
|||
}
|
||||
|
||||
// tracef logs a message with level TRACE.
|
||||
func tracef(format string, params ...interface{}) {
|
||||
func tracef(format string, params ...any) {
|
||||
log().Tracef(format, params...)
|
||||
}
|
||||
|
||||
// infof logs a message with level INFO.
|
||||
func infof(format string, params ...interface{}) {
|
||||
func infof(format string, params ...any) {
|
||||
log().Infof(format, params...)
|
||||
}
|
||||
|
||||
// warnf logs a message with level WARN.
|
||||
func warnf(format string, params ...interface{}) {
|
||||
func warnf(format string, params ...any) {
|
||||
log().Warnf(format, params...)
|
||||
}
|
||||
|
||||
// errorf logs a message with level ERROR.
|
||||
func errorf(format string, params ...interface{}) {
|
||||
func errorf(format string, params ...any) {
|
||||
log().Errorf(format, params...)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
//go:build !dev
|
||||
// +build !dev
|
||||
|
||||
package loopd
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ type swapClientServer struct {
|
|||
openChannelManager *openchannel.Manager
|
||||
assetClient *assets.TapdClient
|
||||
swaps map[lntypes.Hash]loop.SwapInfo
|
||||
subscribers map[int]chan<- interface{}
|
||||
subscribers map[int]chan<- any
|
||||
statusChan chan loop.SwapInfo
|
||||
nextSubscriberID int
|
||||
swapsLock sync.Mutex
|
||||
|
|
@ -678,14 +678,8 @@ func filterSwap(swapInfo *loop.SwapInfo, filter *looprpc.ListSwapsFilter) bool {
|
|||
if swapInfo.SwapType == swap.TypeOut && filter.OutgoingChanSet != nil {
|
||||
// First we sort both channel sets to make sure we can compare
|
||||
// them.
|
||||
sort.Slice(swapInfo.OutgoingChanSet, func(i, j int) bool {
|
||||
return swapInfo.OutgoingChanSet[i] <
|
||||
swapInfo.OutgoingChanSet[j]
|
||||
})
|
||||
sort.Slice(filter.OutgoingChanSet, func(i, j int) bool {
|
||||
return filter.OutgoingChanSet[i] <
|
||||
filter.OutgoingChanSet[j]
|
||||
})
|
||||
slices.Sort(swapInfo.OutgoingChanSet)
|
||||
slices.Sort(filter.OutgoingChanSet)
|
||||
|
||||
// Compare the outgoing channel set by using reflect.DeepEqual
|
||||
// which compares the underlying arrays.
|
||||
|
|
@ -1244,6 +1238,7 @@ func (s *swapClientServer) GetL402Tokens(ctx context.Context,
|
|||
}
|
||||
|
||||
// GetLsatTokens returns all tokens that are contained in the L402 token store.
|
||||
//
|
||||
// Deprecated: use GetL402Tokens.
|
||||
// This API is provided to maintain backward compatibility with gRPC clients
|
||||
// (e.g. `loop listauth`, Terminal Web, RTL).
|
||||
|
|
@ -1809,12 +1804,7 @@ func (s *swapClientServer) ListStaticAddressDeposits(ctx context.Context,
|
|||
var filteredDeposits []*looprpc.Deposit
|
||||
if len(outpoints) > 0 {
|
||||
f := func(d *deposit.Deposit) bool {
|
||||
for _, outpoint := range outpoints {
|
||||
if outpoint == d.OutPoint.String() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(outpoints, d.OutPoint.String())
|
||||
}
|
||||
filteredDeposits = filter(allDeposits, f)
|
||||
|
||||
|
|
@ -2179,7 +2169,7 @@ func (s *swapClientServer) populateBlocksUntilExpiry(ctx context.Context,
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for i := 0; i < len(deposits); i++ {
|
||||
for i := range len(deposits) {
|
||||
deposits[i].BlocksUntilExpiry =
|
||||
deposits[i].ConfirmationHeight +
|
||||
int64(params.Expiry) - bestBlockHeight
|
||||
|
|
@ -2646,7 +2636,7 @@ func hasBandwidth(channels []lndclient.ChannelInfo, amt btcutil.Amount,
|
|||
tracef("Trying to split %v sats into %v parts", amt, shard)
|
||||
|
||||
paid := false
|
||||
for i := 0; i < len(localBalances); i++ {
|
||||
for i := range len(localBalances) {
|
||||
// TODO(hieblmi): Consider channel reserves because the
|
||||
// channel can't send its full local balance.
|
||||
if localBalances[i] >= split {
|
||||
|
|
@ -2753,7 +2743,7 @@ func toClientReservation(
|
|||
}
|
||||
}
|
||||
|
||||
// marshalFixedpoint marshals a fixed point from the tap rfqmath package to the
|
||||
// marshalFixedPoint marshals a fixed point from the tap rfqmath package to the
|
||||
// looprpc package.
|
||||
func marshalFixedPoint(bigIntFixedPoint *rfqmath.BigIntFixedPoint,
|
||||
) *looprpc.FixedPoint {
|
||||
|
|
|
|||
|
|
@ -545,37 +545,37 @@ func (f *formatLogger) record(format string) {
|
|||
}
|
||||
|
||||
// Tracef logs a trace and records its format.
|
||||
func (f *formatLogger) Tracef(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Tracef(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Tracef(format, params...)
|
||||
}
|
||||
|
||||
// Debugf logs a debug message and records its format.
|
||||
func (f *formatLogger) Debugf(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Debugf(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Debugf(format, params...)
|
||||
}
|
||||
|
||||
// Infof logs an info message and records its format.
|
||||
func (f *formatLogger) Infof(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Infof(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Infof(format, params...)
|
||||
}
|
||||
|
||||
// Warnf logs a warning and records its format.
|
||||
func (f *formatLogger) Warnf(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Warnf(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Warnf(format, params...)
|
||||
}
|
||||
|
||||
// Errorf logs an error and records its format.
|
||||
func (f *formatLogger) Errorf(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Errorf(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Errorf(format, params...)
|
||||
}
|
||||
|
||||
// Criticalf logs a critical message and records its format.
|
||||
func (f *formatLogger) Criticalf(format string, params ...interface{}) {
|
||||
func (f *formatLogger) Criticalf(format string, params ...any) {
|
||||
f.record(format)
|
||||
f.Logger.Criticalf(format, params...)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ func TestProtocolVersionMarshalUnMarshal(t *testing.T) {
|
|||
bogusVersion := []byte{0xFF, 0xFF, 0xFF, 0xFF}
|
||||
invalidSlice := []byte{0xFF, 0xFF, 0xFF}
|
||||
|
||||
for i := 0; i < len(testVersions); i++ {
|
||||
for i := range len(testVersions) {
|
||||
testVersion := testVersions[i]
|
||||
|
||||
// Test that unmarshal(marshal(v)) == v.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import (
|
|||
type LoopInContract struct {
|
||||
SwapContract
|
||||
|
||||
// SweepConfTarget specifies the targeted confirmation target for the
|
||||
// HtlcConfTarget specifies the targeted confirmation target for the
|
||||
// client sweep tx.
|
||||
HtlcConfTarget int32
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// metaBucket stores all the meta information concerning the state of
|
||||
// metaBucketKey stores all the meta information concerning the state of
|
||||
// the database.
|
||||
metaBucketKey = []byte("metadata")
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ func NewMigrationError(err error) *migrationError {
|
|||
return &migrationError{Err: err}
|
||||
}
|
||||
|
||||
func equalValues(src interface{}, dst interface{}) error {
|
||||
func equalValues(src any, dst any) error {
|
||||
mt := &mockTesting{}
|
||||
|
||||
require.EqualValues(mt, src, dst)
|
||||
|
|
@ -405,14 +405,14 @@ type mockTesting struct {
|
|||
failNow bool
|
||||
fail bool
|
||||
format string
|
||||
args []interface{}
|
||||
args []any
|
||||
}
|
||||
|
||||
func (m *mockTesting) FailNow() {
|
||||
m.failNow = true
|
||||
}
|
||||
|
||||
func (m *mockTesting) Errorf(format string, args ...interface{}) {
|
||||
func (m *mockTesting) Errorf(format string, args ...any) {
|
||||
m.format = format
|
||||
m.args = args
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,25 +19,25 @@ func TestMigrationUpdates(t *testing.T) {
|
|||
legacyDbVersion = Hex("00000003")
|
||||
)
|
||||
|
||||
legacyDb := map[string]interface{}{
|
||||
"metadata": map[string]interface{}{
|
||||
legacyDb := map[string]any{
|
||||
"metadata": map[string]any{
|
||||
"dbp": legacyDbVersion,
|
||||
},
|
||||
"loop-in": map[string]interface{}{
|
||||
Hex("acae09fec9020b7996042613eede68a9eaf29eb28c21ea9943b19e344365a4bb"): map[string]interface{}{
|
||||
"loop-in": map[string]any{
|
||||
Hex("acae09fec9020b7996042613eede68a9eaf29eb28c21ea9943b19e344365a4bb"): map[string]any{
|
||||
"contract": Hex("161b25277262bdb5c7c2827b975b2cbc7eb13e222b30cf88ea6daef4bcf22bdac4116c23071472cb000000000000ea6003f2f513a8fd7958b6a229dfb8835f6ab2c9c63cc3e138784d3e8c0e0ebbdd4e61033f26c40666977ed497eea4694d6dd3f07dbcf037089234ff665cd0a07fea329400007b8a00000000000059a600000000000009ca000077a20000000600000000000000000000000000000000000000000000000000000000000000000000"),
|
||||
"updates": map[string]interface{}{
|
||||
"updates": map[string]any{
|
||||
Hex("0000000000000001"): Hex("161b252772cb524508000000000000000000000000000000000000000000000000"),
|
||||
Hex("0000000000000002"): Hex("161b252837115e9b09ffffffffffff1f6a00000000000000000000000000000000"),
|
||||
Hex("0000000000000003"): Hex("161b252ab670360d0200000000000009ca00000000000000000000000000000000"),
|
||||
},
|
||||
},
|
||||
},
|
||||
"uncharge-swaps": map[string]interface{}{
|
||||
Hex("c3b3d7a145dbd2bab5aa1f505305f31ee432fe23b0801f065fac453dd9b1f923"): map[string]interface{}{
|
||||
"uncharge-swaps": map[string]any{
|
||||
Hex("c3b3d7a145dbd2bab5aa1f505305f31ee432fe23b0801f065fac453dd9b1f923"): map[string]any{
|
||||
"contract": Hex("161b2526643767387ca76e58c964a8f2b6c0a13392b2dea93bde260226a263fb836954054ed1756b000000000000c350fd11016c6e6263727431333337306e3170303072343775707035366c7671663836753565766135647868686c706c78303733756a70676e3979767977376130766a37746d307678793276683576716471327770657832757270307963717a7279787139377a76757173703570373232733970686a6e6e6e706c3778716e796a78353373706863346c396735306b396e347836703761793577707539306b6673397179397173717a353766676a7a67676838343439377375716b383436787a3333336a713036736c6b38637a323872657466363672796b7876396a746e6a3072683979666a6170777065617265713071396679797a666664676d6874687973617370757565746e6b72306b32376370326173366a750269d66fd2cea620dc06f1f7de7838f0c8b145b82c7033080c398862f3421a23230382cb637badbb07f9926a06ecd88b6150513ea0060dc8d6dc1c1fb623926b0a0f000077d400000000000b458c00000000000005f10000000000000024000077a22c6263727431713271756332666777737971376463617a73666e3332636a7874667671647671366a6c70706574fd0f016c6e626372743530313834306e317030307234377570703563776561306732396d30667434646432726167397870306e726d6a72396c33726b7a717037706a6c34337a6e6d6b64336c79337364713877646d6b7a757163717a7279787139377a767571737035616478717538766168643730743776747165777578366d6d64337977636639767835736476717567753833327230676e373466733971793971737168746773636638386e377664767136716e71307a657775366d7471616e326c7a306e7534737a72376c6b36646d343673336c78726572656e333972616b7a6c777378346c613538733966773630356d6767766b766879716e743339713976737367777879367571707236713273780000000600000000000003f20000000000000000161b25262710ce00"),
|
||||
"outgoing-chan-set": nil,
|
||||
"updates": map[string]interface{}{
|
||||
"updates": map[string]any{
|
||||
Hex("0000000000000001"): Hex("161b252a770e649b01000000000000053900000000000000000000000000000001"),
|
||||
Hex("0000000000000002"): Hex("161b252ab671bdd90200000000000005f10000000000001a9c0000000000000003"),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ type PostgresConfig struct {
|
|||
Host string `long:"host" description:"Database server hostname."`
|
||||
Port int `long:"port" description:"Database server port."`
|
||||
User string `long:"user" description:"Database user."`
|
||||
Password string `long:"password" description:"Database user's password."`
|
||||
Password string `long:"password" description:"Database user's password."` //nolint:gosec
|
||||
DBName string `long:"dbname" description:"Database name to use."`
|
||||
MaxOpenConnections int32 `long:"maxconnections" description:"Max open connections to keep alive to the database server."`
|
||||
RequireSSL bool `long:"requiressl" description:"Whether to require using SSL (mode: require) when connecting to the server."`
|
||||
|
|
|
|||
|
|
@ -43,12 +43,13 @@ const (
|
|||
// canceling loop out swaps.
|
||||
ProtocolVersionLoopOutCancel = 7
|
||||
|
||||
// ProtocolVerionProbe indicates that the client is able to request
|
||||
// ProtocolVersionProbe indicates that the client is able to request
|
||||
// the server to perform a probe to test inbound liquidty.
|
||||
ProtocolVersionProbe ProtocolVersion = 8
|
||||
|
||||
// The client may ask the server to use a custom routing helper plugin
|
||||
// in order to enhance off-chain payments corresponding to a swap.
|
||||
// ProtocolVersionRoutingPlugin indicates that the client may ask the
|
||||
// server to use a custom routing helper plugin in order to enhance
|
||||
// off-chain payments corresponding to a swap.
|
||||
ProtocolVersionRoutingPlugin = 9
|
||||
|
||||
// ProtocolVersionHtlcV3 indicates that the client will now use the new
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import (
|
|||
//
|
||||
// Example output:
|
||||
//
|
||||
// map[string]interface{}{
|
||||
// Hex("1234"): map[string]interface{}{
|
||||
// map[string]any{
|
||||
// Hex("1234"): map[string]any{
|
||||
// "human-readable": Hex("102030"),
|
||||
// Hex("1111"): Hex("5783492373"),
|
||||
// },
|
||||
|
|
@ -36,7 +36,7 @@ func DumpDB(tx *bbolt.Tx) error { // nolint: unused
|
|||
}
|
||||
|
||||
func dumpBucket(bucket *bbolt.Bucket) error { // nolint: unused
|
||||
fmt.Printf("map[string]interface{} {\n")
|
||||
fmt.Printf("map[string]any {\n")
|
||||
err := bucket.ForEach(func(k, v []byte) error {
|
||||
key := toString(k)
|
||||
fmt.Printf("%v: ", key)
|
||||
|
|
@ -63,11 +63,11 @@ func dumpBucket(bucket *bbolt.Bucket) error { // nolint: unused
|
|||
}
|
||||
|
||||
// RestoreDB primes the database with the given data set.
|
||||
func RestoreDB(tx *bbolt.Tx, data map[string]interface{}) error {
|
||||
func RestoreDB(tx *bbolt.Tx, data map[string]any) error {
|
||||
for k, v := range data {
|
||||
key := []byte(k)
|
||||
|
||||
value := v.(map[string]interface{})
|
||||
value := v.(map[string]any)
|
||||
|
||||
subBucket, err := tx.CreateBucket(key)
|
||||
if err != nil {
|
||||
|
|
@ -83,7 +83,7 @@ func RestoreDB(tx *bbolt.Tx, data map[string]interface{}) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func restoreDB(bucket *bbolt.Bucket, data map[string]interface{}) error {
|
||||
func restoreDB(bucket *bbolt.Bucket, data map[string]any) error {
|
||||
for k, v := range data {
|
||||
key := []byte(k)
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ func restoreDB(bucket *bbolt.Bucket, data map[string]interface{}) error {
|
|||
}
|
||||
|
||||
// Key contains a sub-bucket.
|
||||
case map[string]interface{}:
|
||||
case map[string]any:
|
||||
subBucket, err := bucket.CreateBucket(key)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ func (db *BaseDB) convertLoopInRow(row sqlc.GetLoopInSwapsRow,
|
|||
func getSwapEvents(updates []sqlc.SwapUpdate) ([]*LoopEvent, error) {
|
||||
events := make([]*LoopEvent, len(updates))
|
||||
|
||||
for i := 0; i < len(events); i++ {
|
||||
for i := range len(events) {
|
||||
events[i] = &LoopEvent{
|
||||
SwapStateData: SwapStateData{
|
||||
State: SwapState(updates[i].UpdateState),
|
||||
|
|
|
|||
|
|
@ -569,14 +569,14 @@ func randomBytes(length int) []byte {
|
|||
return b
|
||||
}
|
||||
|
||||
func randomStruct(v interface{}) error {
|
||||
func randomStruct(v any) error {
|
||||
val := reflect.ValueOf(v)
|
||||
if val.Kind() != reflect.Ptr || val.Elem().Kind() != reflect.Struct {
|
||||
return errors.New("Input should be a pointer to a struct type")
|
||||
}
|
||||
|
||||
val = val.Elem()
|
||||
for i := 0; i < val.NumField(); i++ {
|
||||
for i := range val.NumField() {
|
||||
field := val.Field(i)
|
||||
|
||||
switch field.Kind() {
|
||||
|
|
@ -598,12 +598,12 @@ func randomStruct(v interface{}) error {
|
|||
}
|
||||
|
||||
case reflect.Struct:
|
||||
if field.Type() == reflect.TypeOf(time.Time{}) {
|
||||
if field.Type() == reflect.TypeFor[time.Time]() {
|
||||
if field.CanSet() {
|
||||
field.Set(reflect.ValueOf(time.Now()))
|
||||
}
|
||||
}
|
||||
if field.Type() == reflect.TypeOf(route.Vertex{}) {
|
||||
if field.Type() == reflect.TypeFor[route.Vertex]() {
|
||||
if field.CanSet() {
|
||||
vertex, err := route.NewVertexFromBytes(
|
||||
randomBytes(route.VertexSize),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ var (
|
|||
// value: uint32 confirmation value
|
||||
confirmationsKey = []byte("confirmations")
|
||||
|
||||
// liquidtyBucket is a root bucket used to save liquidity manager
|
||||
// liquidityBucket is a root bucket used to save liquidity manager
|
||||
// related info.
|
||||
liquidityBucket = []byte("liquidity")
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ func (s *StoreMock) FetchLoopOutSwaps(ctx context.Context) ([]*LoopOut, error) {
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// FetchLoopOutSwaps returns all swaps currently in the store.
|
||||
// FetchLoopOutSwap returns a swap currently in the store.
|
||||
//
|
||||
// NOTE: Part of the SwapStore interface.
|
||||
func (s *StoreMock) FetchLoopOutSwap(ctx context.Context,
|
||||
|
|
@ -261,7 +261,7 @@ func (s *StoreMock) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// isDone asserts that the store mock has no pending operations.
|
||||
// IsDone asserts that the store mock has no pending operations.
|
||||
func (s *StoreMock) IsDone() error {
|
||||
select {
|
||||
case <-s.loopOutStoreChan:
|
||||
|
|
@ -312,7 +312,7 @@ func (s *StoreMock) AssertLoopInStored() {
|
|||
}
|
||||
}
|
||||
|
||||
// assertLoopInState asserts that a specified state transition is persisted to
|
||||
// AssertLoopInState asserts that a specified state transition is persisted to
|
||||
// disk.
|
||||
func (s *StoreMock) AssertLoopInState(
|
||||
expectedState SwapState) SwapStateData {
|
||||
|
|
|
|||
|
|
@ -387,8 +387,8 @@ func TestVersionNew(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestVersionNew tests that an existing version zero database is migrated to
|
||||
// the latest version.
|
||||
// TestVersionMigrated tests that an existing version zero database is migrated
|
||||
// to the latest version.
|
||||
func TestVersionMigrated(t *testing.T) {
|
||||
tempDirName, err := ioutil.TempDir("", "clientstore")
|
||||
if err != nil {
|
||||
|
|
@ -442,15 +442,15 @@ func TestLegacyOutgoingChannel(t *testing.T) {
|
|||
|
||||
ctxb := context.Background()
|
||||
|
||||
legacyDb := map[string]interface{}{
|
||||
"loop-in": map[string]interface{}{},
|
||||
"metadata": map[string]interface{}{
|
||||
legacyDb := map[string]any{
|
||||
"loop-in": map[string]any{},
|
||||
"metadata": map[string]any{
|
||||
"dbp": legacyDbVersion,
|
||||
},
|
||||
"uncharge-swaps": map[string]interface{}{
|
||||
Hex("2a595d79a55168970532805ae20c9b5fac98f04db79ba4c6ae9b9ac0f206359e"): map[string]interface{}{
|
||||
"uncharge-swaps": map[string]any{
|
||||
Hex("2a595d79a55168970532805ae20c9b5fac98f04db79ba4c6ae9b9ac0f206359e"): map[string]any{
|
||||
"contract": Hex("1562d6fbec140000010101010202020203030303040404040101010102020202030303030404040400000000000000640d707265706179696e766f69636501010101010101010101010101010101010101010101010101010101010101010201010101010101010101010101010101010101010101010101010101010101010300000090000000000000000a0000000000000014000000000000002800000063223347454e556d6e4552745766516374344e65676f6d557171745a757a5947507742530b73776170696e766f69636500000002000000000000001e") + legacyOutgoingChannel + Hex("1562d6fbec140000"),
|
||||
"updates": map[string]interface{}{
|
||||
"updates": map[string]any{
|
||||
Hex("0000000000000001"): Hex("1508290a92d4c00001000000000000000000000000000000000000000000000000"),
|
||||
Hex("0000000000000002"): Hex("1508290a92d4c00006000000000000000000000000000000000000000000000000"),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ func (s SwapState) String() string {
|
|||
|
||||
// SwapCost is a breakdown of the final swap costs.
|
||||
type SwapCost struct {
|
||||
// Swap is the amount paid to the server.
|
||||
// Server is the amount paid to the server.
|
||||
Server btcutil.Amount
|
||||
|
||||
// Onchain is the amount paid to miners for the onchain tx.
|
||||
|
|
@ -189,7 +189,7 @@ func (s SwapCost) Total() btcutil.Amount {
|
|||
|
||||
// SwapStateData is all persistent data to describe the current swap state.
|
||||
type SwapStateData struct {
|
||||
// SwapState is the state the swap is in.
|
||||
// State is the state the swap is in.
|
||||
State SwapState
|
||||
|
||||
// Cost are the accrued (final) costs so far.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
//go:build !test_db_postgres
|
||||
// +build !test_db_postgres
|
||||
|
||||
package loopdb
|
||||
|
||||
|
|
|
|||
|
|
@ -362,7 +362,8 @@ func awaitProbe(ctx context.Context, lnd lndclient.LndServices,
|
|||
// server will know that its probe was
|
||||
// successful.
|
||||
err := lnd.Invoices.CancelInvoice(
|
||||
ctx, probeHash,
|
||||
context.WithoutCancel(ctx),
|
||||
probeHash,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("Cancel probe "+
|
||||
|
|
@ -529,13 +530,11 @@ func (s *loopInSwap) execute(mainCtx context.Context,
|
|||
subCtx, cancel := context.WithCancel(mainCtx)
|
||||
defer cancel()
|
||||
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
s.wg.Go(func() {
|
||||
subscribeAndLogUpdates(
|
||||
subCtx, s.hash, s.log, s.server.SubscribeLoopInUpdates,
|
||||
)
|
||||
}()
|
||||
})
|
||||
|
||||
// Announce swap by sending out an initial update.
|
||||
err := s.sendUpdate(mainCtx)
|
||||
|
|
|
|||
|
|
@ -4,14 +4,17 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
"github.com/lightninglabs/loop/test"
|
||||
"github.com/lightninglabs/loop/utils"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
invpkg "github.com/lightningnetwork/lnd/invoices"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/routing/route"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
@ -25,6 +28,86 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
// probeInvoicesMock is a controllable InvoicesClient mock used by probe tests.
|
||||
// It allows the test to block and inspect CancelInvoice context behavior.
|
||||
type probeInvoicesMock struct {
|
||||
lndclient.InvoicesClient
|
||||
|
||||
updateChan chan lndclient.InvoiceUpdate
|
||||
errChan chan error
|
||||
|
||||
cancelCalled chan struct{}
|
||||
cancelBlock chan struct{}
|
||||
cancelCtxErr chan error
|
||||
}
|
||||
|
||||
// SubscribeSingleInvoice returns the mock's preconfigured channels.
|
||||
func (p *probeInvoicesMock) SubscribeSingleInvoice(_ context.Context,
|
||||
_ lntypes.Hash) (<-chan lndclient.InvoiceUpdate, <-chan error, error) {
|
||||
|
||||
return p.updateChan, p.errChan, nil
|
||||
}
|
||||
|
||||
// CancelInvoice signals that cancellation was requested, blocks until released
|
||||
// by the test, then reports ctx.Err() so the test can assert context liveness.
|
||||
func (p *probeInvoicesMock) CancelInvoice(ctx context.Context,
|
||||
_ lntypes.Hash) error {
|
||||
|
||||
close(p.cancelCalled)
|
||||
<-p.cancelBlock
|
||||
p.cancelCtxErr <- ctx.Err()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TestAwaitProbeCancelInvoiceUsesLiveContext checks that probe-invoice cleanup
|
||||
// runs with a live context. Specifically, after probe success we cancel the
|
||||
// parent context before allowing CancelInvoice to proceed, and verify the
|
||||
// CancelInvoice call still observes ctx.Err() == nil.
|
||||
func TestAwaitProbeCancelInvoiceUsesLiveContext(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
invoices := &probeInvoicesMock{
|
||||
updateChan: make(chan lndclient.InvoiceUpdate, 1),
|
||||
errChan: make(chan error, 1),
|
||||
cancelCalled: make(chan struct{}),
|
||||
cancelBlock: make(chan struct{}),
|
||||
cancelCtxErr: make(chan error, 1),
|
||||
}
|
||||
lnd := lndclient.LndServices{
|
||||
Invoices: invoices,
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
probeResult, err := awaitProbe(ctx, lnd, lntypes.Hash{1})
|
||||
require.NoError(t, err)
|
||||
|
||||
invoices.updateChan <- lndclient.InvoiceUpdate{
|
||||
Invoice: lndclient.Invoice{
|
||||
State: invpkg.ContractAccepted,
|
||||
},
|
||||
}
|
||||
|
||||
require.NoError(t, <-probeResult)
|
||||
|
||||
select {
|
||||
case <-invoices.cancelCalled:
|
||||
case <-time.After(time.Second):
|
||||
t.Fatal("timed out waiting for CancelInvoice call")
|
||||
}
|
||||
|
||||
cancel()
|
||||
close(invoices.cancelBlock)
|
||||
|
||||
select {
|
||||
case cancelCtxErr := <-invoices.cancelCtxErr:
|
||||
require.NoError(t, cancelCtxErr)
|
||||
|
||||
case <-time.After(time.Second):
|
||||
t.Fatal("timed out waiting for CancelInvoice to return")
|
||||
}
|
||||
}
|
||||
|
||||
// TestLoopInSuccess tests the success scenario where the swap completes the
|
||||
// happy flow.
|
||||
func TestLoopInSuccess(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ type loopInTestContext struct {
|
|||
cfg *executeConfig
|
||||
statusChan chan SwapInfo
|
||||
errChan chan error
|
||||
blockEpochChan chan interface{}
|
||||
blockEpochChan chan any
|
||||
|
||||
swapInvoiceSubscription *test.SingleInvoiceSubscription
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ func newLoopInTestContext(t *testing.T) *loopInTestContext {
|
|||
store := loopdb.NewStoreMock(t)
|
||||
sweeper := sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
errChan := make(chan error)
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ type executeConfig struct {
|
|||
sweeper *sweep.Sweeper
|
||||
batcher *sweepbatcher.Batcher
|
||||
statusChan chan<- SwapInfo
|
||||
blockEpochChan <-chan interface{}
|
||||
blockEpochChan <-chan any
|
||||
timerFactory func(time.Duration) <-chan time.Time
|
||||
loopOutMaxParts uint32
|
||||
totalPaymentTimeout time.Duration
|
||||
|
|
@ -386,13 +386,11 @@ func (s *loopOutSwap) execute(mainCtx context.Context,
|
|||
subCtx, cancel := context.WithCancel(mainCtx)
|
||||
defer cancel()
|
||||
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
s.wg.Go(func() {
|
||||
subscribeAndLogUpdates(
|
||||
subCtx, s.hash, s.log, s.server.SubscribeLoopOutUpdates,
|
||||
)
|
||||
}()
|
||||
})
|
||||
|
||||
// Execute swap.
|
||||
err := s.executeAndFinalize(mainCtx)
|
||||
|
|
|
|||
|
|
@ -155,10 +155,7 @@ func (p *loopOutSweepFeerateProvider) GetConfTargetAndFeeRate(
|
|||
if confTarget <= DefaultSweepConfTargetDelta {
|
||||
// If confTarget is already <= urgentSweepConfTarget, don't
|
||||
// increase it.
|
||||
newConfTarget := int32(urgentSweepConfTarget)
|
||||
if confTarget < newConfTarget {
|
||||
newConfTarget = confTarget
|
||||
}
|
||||
newConfTarget := min(confTarget, int32(urgentSweepConfTarget))
|
||||
|
||||
log.Infof("Swap %x is about to expire (blocksUntilExpiry=%d), "+
|
||||
"reducing its confTarget from %d to %d and multiplying"+
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ func TestLoopOutPaymentParameters(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
// TestLoopOutPaymentParameters tests the first part of the loop out process up
|
||||
// testLoopOutPaymentParameters tests the first part of the loop out process up
|
||||
// to the point where the off-chain payments are made.
|
||||
func testLoopOutPaymentParameters(t *testing.T) {
|
||||
defer test.Guard(t)()
|
||||
|
|
@ -66,7 +66,7 @@ func testLoopOutPaymentParameters(t *testing.T) {
|
|||
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
|
||||
const maxParts = uint32(5)
|
||||
|
|
@ -205,7 +205,7 @@ func testLateHtlcPublish(t *testing.T) {
|
|||
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
|
||||
errChan := make(chan error)
|
||||
|
|
@ -308,7 +308,7 @@ func testCustomSweepConfTarget(t *testing.T) {
|
|||
//
|
||||
// TODO: create test context similar to loopInTestContext.
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
expiryChan := make(chan time.Time)
|
||||
timerFactory := func(expiry time.Duration) <-chan time.Time {
|
||||
|
|
@ -330,7 +330,7 @@ func testCustomSweepConfTarget(t *testing.T) {
|
|||
lnd.ChainParams, batcherStore, sweepStore,
|
||||
)
|
||||
|
||||
tctx, cancel := context.WithCancel(context.Background())
|
||||
tctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
go func() {
|
||||
|
|
@ -415,7 +415,7 @@ func testCustomSweepConfTarget(t *testing.T) {
|
|||
|
||||
// Try MuSig2 signing first and fail it so that we go for a
|
||||
// normal sweep.
|
||||
for i := 0; i < maxMusigSweepRetries; i++ {
|
||||
for range maxMusigSweepRetries {
|
||||
expiryChan <- time.Now()
|
||||
preimage := <-server.preimagePush
|
||||
require.Equal(t, swap.Preimage, preimage)
|
||||
|
|
@ -485,6 +485,9 @@ func testCustomSweepConfTarget(t *testing.T) {
|
|||
// confirmations.
|
||||
ctx.AssertRegisterConf(true, 3)
|
||||
|
||||
// Send the batch confirmation so the batch exits cleanly.
|
||||
ctx.NotifyConf(sweepTx)
|
||||
|
||||
cfg.store.(*loopdb.StoreMock).AssertLoopOutState(loopdb.StateSuccess)
|
||||
status = <-statusChan
|
||||
require.Equal(t, loopdb.StateSuccess, status.State)
|
||||
|
|
@ -546,7 +549,7 @@ func testPreimagePush(t *testing.T) {
|
|||
|
||||
// Set up the required dependencies to execute the swap.
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
expiryChan := make(chan time.Time)
|
||||
timerFactory := func(_ time.Duration) <-chan time.Time {
|
||||
|
|
@ -568,7 +571,7 @@ func testPreimagePush(t *testing.T) {
|
|||
lnd.ChainParams, batcherStore, sweepStore,
|
||||
)
|
||||
|
||||
tctx, cancel := context.WithCancel(context.Background())
|
||||
tctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
go func() {
|
||||
|
|
@ -579,7 +582,7 @@ func testPreimagePush(t *testing.T) {
|
|||
}()
|
||||
|
||||
go func() {
|
||||
err := swap.execute(context.Background(), &executeConfig{
|
||||
err := swap.execute(tctx, &executeConfig{
|
||||
statusChan: statusChan,
|
||||
blockEpochChan: blockEpochChan,
|
||||
timerFactory: timerFactory,
|
||||
|
|
@ -804,7 +807,7 @@ func testFailedOffChainCancelation(t *testing.T) {
|
|||
|
||||
// Set up the required dependencies to execute the swap.
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
expiryChan := make(chan time.Time)
|
||||
timerFactory := func(_ time.Duration) <-chan time.Time {
|
||||
|
|
@ -958,7 +961,7 @@ func TestLoopOutMuSig2Sweep(t *testing.T) {
|
|||
|
||||
// Set up the required dependencies to execute the swap.
|
||||
sweeper := &sweep.Sweeper{Lnd: &lnd.LndServices}
|
||||
blockEpochChan := make(chan interface{})
|
||||
blockEpochChan := make(chan any)
|
||||
statusChan := make(chan SwapInfo)
|
||||
expiryChan := make(chan time.Time)
|
||||
timerFactory := func(_ time.Duration) <-chan time.Time {
|
||||
|
|
@ -988,7 +991,7 @@ func TestLoopOutMuSig2Sweep(t *testing.T) {
|
|||
lnd.ChainParams, batcherStore, sweepStore,
|
||||
)
|
||||
|
||||
tctx, cancel := context.WithCancel(context.Background())
|
||||
tctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
go func() {
|
||||
|
|
@ -999,7 +1002,7 @@ func TestLoopOutMuSig2Sweep(t *testing.T) {
|
|||
}()
|
||||
|
||||
go func() {
|
||||
err := swap.execute(context.Background(), &executeConfig{
|
||||
err := swap.execute(tctx, &executeConfig{
|
||||
statusChan: statusChan,
|
||||
blockEpochChan: blockEpochChan,
|
||||
timerFactory: timerFactory,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ require (
|
|||
dario.cat/mergo v1.0.1 // indirect
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.2 // indirect
|
||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
|
||||
github.com/aead/siphash v1.0.1 // indirect
|
||||
|
|
@ -47,7 +47,7 @@ require (
|
|||
github.com/decred/dcrd/lru v1.1.2 // indirect
|
||||
github.com/docker/cli v28.1.1+incompatible // indirect
|
||||
github.com/docker/docker v28.1.1+incompatible // indirect
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-connections v0.5.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/fergusstrange/embedded-postgres v1.25.0 // indirect
|
||||
|
|
@ -84,7 +84,7 @@ require (
|
|||
github.com/jessevdk/go-flags v1.4.0 // indirect
|
||||
github.com/jonboulle/clockwork v0.2.2 // indirect
|
||||
github.com/jrick/logrotate v1.1.2 // indirect
|
||||
github.com/json-iterator/go v1.1.11 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/kkdai/bstream v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.17.9 // indirect
|
||||
github.com/lib/pq v1.10.9 // indirect
|
||||
|
|
@ -109,10 +109,10 @@ require (
|
|||
github.com/moby/sys/user v0.3.0 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.1 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/opencontainers/image-spec v1.0.2 // indirect
|
||||
github.com/opencontainers/image-spec v1.1.0 // indirect
|
||||
github.com/opencontainers/runc v1.2.8 // indirect
|
||||
github.com/ory/dockertest/v3 v3.10.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
|
|
@ -144,28 +144,26 @@ require (
|
|||
go.etcd.io/etcd/raft/v3 v3.5.12 // indirect
|
||||
go.etcd.io/etcd/server/v3 v3.5.12 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
|
||||
go.opentelemetry.io/otel v1.40.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.40.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.40.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
golang.org/x/crypto v0.45.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
|
||||
golang.org/x/mod v0.29.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.40.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.38.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
|
||||
gopkg.in/errgo.v1 v1.0.1 // indirect
|
||||
|
|
@ -189,3 +187,7 @@ require (
|
|||
replace gonum.org/v1/gonum => github.com/gonum/gonum v0.11.0
|
||||
|
||||
replace gonum.org/v1/plot => github.com/gonum/plot v0.10.1
|
||||
|
||||
replace github.com/golang-migrate/migrate/v4 => github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2
|
||||
|
||||
replace lukechampine.com/uint128 => github.com/lukechampine/uint128 v1.2.0
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y=
|
||||
cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU=
|
||||
cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls=
|
||||
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
|
||||
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
||||
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
|
||||
|
|
@ -14,8 +9,8 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8
|
|||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
|
||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
|
||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
|
||||
|
|
@ -88,8 +83,6 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
|
|||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 h1:DBmgJDC9dTfkVyGgipamEh2BpGYxScCH1TOF1LL1cXc=
|
||||
github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=
|
||||
|
|
@ -119,16 +112,16 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3
|
|||
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
|
||||
github.com/decred/dcrd/lru v1.1.2 h1:KdCzlkxppuoIDGEvCGah1fZRicrDH36IipvlB1ROkFY=
|
||||
github.com/decred/dcrd/lru v1.1.2/go.mod h1:gEdCVgXs1/YoBvFWt7Scgknbhwik3FgVSzlnCcXL2N8=
|
||||
github.com/dhui/dktest v0.4.0 h1:z05UmuXZHO/bgj/ds2bGMBu8FI4WA+Ag/m3ghL+om7M=
|
||||
github.com/dhui/dktest v0.4.0/go.mod h1:v/Dbz1LgCBOi2Uki2nUqLBGa83hWBGFMu5MrgMDCc78=
|
||||
github.com/dhui/dktest v0.4.5 h1:uUfYBIVREmj/Rw6MvgmqNAYzTiKOHJak+enB5Di73MM=
|
||||
github.com/dhui/dktest v0.4.5/go.mod h1:tmcyeHDKagvlDrz7gDKq4UAJOLIfVZYkfD5OnHDwcCo=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
|
||||
github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/docker v28.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I=
|
||||
github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
|
||||
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
|
|
@ -137,8 +130,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
|
|||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fergusstrange/embedded-postgres v1.25.0 h1:sa+k2Ycrtz40eCRPOzI7Ry7TtkWXXJ+YRsxpKMDhxK0=
|
||||
|
|
@ -179,8 +170,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
|||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
|
||||
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang-migrate/migrate/v4 v4.17.0 h1:rd40H3QXU0AA4IoLllFcEAEo9dYKRHYND2gB4p7xcaU=
|
||||
github.com/golang-migrate/migrate/v4 v4.17.0/go.mod h1:+Cp2mtLP4/aXDTKb9wmXYitdrNx2HGs45rbWAo6OsKM=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
|
|
@ -306,8 +295,9 @@ github.com/jrick/logrotate v1.1.2 h1:6ePk462NCX7TfKtNp5JJ7MbA2YIslkpfgP03TlTYMN0
|
|||
github.com/jrick/logrotate v1.1.2/go.mod h1:f9tdWggSVK3iqavGpyvegq5IhNois7KXmasU6/N96OQ=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
|
||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/juju/mgotest v1.0.1/go.mod h1:vTaDufYul+Ps8D7bgseHjq87X8eu0ivlKLp9mVc/Bfc=
|
||||
github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM=
|
||||
github.com/juju/qthttptest v0.0.1/go.mod h1://LCf/Ls22/rPw2u1yWukUJvYtfPY4nYpWUl2uZhryo=
|
||||
|
|
@ -346,6 +336,8 @@ github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI
|
|||
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
|
||||
github.com/lightninglabs/loop/swapserverrpc v1.0.14 h1:0+UrC2oNFsWYqGZjmU+Fkcn8iXsea89VZdfmBXSyPPg=
|
||||
github.com/lightninglabs/loop/swapserverrpc v1.0.14/go.mod h1:HDRyzFOZeX0e1P9f9RSFE7FzE5u6Eta0hPqx5W7Wp24=
|
||||
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2 h1:eFjp1dIB2BhhQp/THKrjLdlYuPugO9UU4kDqu91OX/Q=
|
||||
github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY=
|
||||
github.com/lightninglabs/neutrino v0.16.1 h1:5Kz4ToxncEVkpKC6fwUjXKtFKJhuxlG3sBB3MdJTJjs=
|
||||
github.com/lightninglabs/neutrino v0.16.1/go.mod h1:L+5UAccpUdyM7yDgmQySgixf7xmwBgJtOfs/IP26jCs=
|
||||
github.com/lightninglabs/neutrino/cache v1.1.2 h1:C9DY/DAPaPxbFC+xNNEI/z1SJY9GS3shmlu5hIQ798g=
|
||||
|
|
@ -396,8 +388,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
|
|||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
|
|
@ -421,8 +414,8 @@ github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q=
|
|||
github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
||||
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
|
||||
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
|
||||
github.com/opencontainers/runc v1.2.8 h1:RnEICeDReapbZ5lZEgHvj7E9Q3Eex9toYmaGBsbvU5Q=
|
||||
github.com/opencontainers/runc v1.2.8/go.mod h1:cC0YkmZcuvr+rtBZ6T7NBoVbMGNAdLa/21vIElJDOzI=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
|
|
@ -531,14 +524,14 @@ go.etcd.io/etcd/server/v3 v3.5.12 h1:EtMjsbfyfkwZuA2JlKOiBfuGkFCekv5H178qjXypbG8
|
|||
go.etcd.io/etcd/server/v3 v3.5.12/go.mod h1:axB0oCjMy+cemo5290/CutIjoxlfA6KVYKD1w0uue10=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
|
||||
go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
|
||||
go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 h1:dIIDULZJpgdiHz5tXrTgKIMLkus6jEFa7x5SOKcyR7E=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0/go.mod h1:jlRVBe7+Z1wyxFSUs48L6OBQZ5JwH2Hg/Vbl+t9rAgI=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0=
|
||||
go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
|
||||
|
|
@ -549,8 +542,8 @@ go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4A
|
|||
go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg=
|
||||
go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
|
||||
go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
|
|
@ -633,8 +626,6 @@ golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
|||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
|
||||
golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -704,8 +695,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
|||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
|
|
@ -738,8 +729,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98
|
|||
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA=
|
||||
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y=
|
||||
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf h1:GillM0Ef0pkZPIB+5iO6SDK+4T9pf6TpaYR6ICD5rVE=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:OFMYQFHJ4TM3JRlWDZhJbZfra2uqc3WLBZiaaqP4DtU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q=
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func NewManager(cfg *Config) *Manager {
|
|||
|
||||
type subscriber struct {
|
||||
subCtx context.Context
|
||||
recvChan interface{}
|
||||
recvChan any
|
||||
}
|
||||
|
||||
// SubscribeReservations subscribes to the reservation notifications.
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@ func (m *mockSubscribeNotificationsClient) Context() context.Context {
|
|||
return context.TODO()
|
||||
}
|
||||
|
||||
func (m *mockSubscribeNotificationsClient) SendMsg(interface{}) error {
|
||||
func (m *mockSubscribeNotificationsClient) SendMsg(any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *mockSubscribeNotificationsClient) RecvMsg(interface{}) error {
|
||||
func (m *mockSubscribeNotificationsClient) RecvMsg(any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -125,8 +125,7 @@ func TestManager_ReservationNotification(t *testing.T) {
|
|||
subChan := mgr.SubscribeReservations(subCtx)
|
||||
|
||||
// Run the manager.
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := t.Context()
|
||||
|
||||
go func() {
|
||||
err := mgr.Run(ctx)
|
||||
|
|
@ -229,13 +228,11 @@ func TestManager_Backoff(t *testing.T) {
|
|||
defer cancel()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
// We ignore the returned error because the Manager returns
|
||||
// nil on context cancel.
|
||||
_ = mgr.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait long enough to see at least 3 subscription attempts using
|
||||
// the Manager's default pattern.
|
||||
|
|
@ -318,11 +315,9 @@ func TestManager_MinAliveConnTime(t *testing.T) {
|
|||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
_ = mgr.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Let the subscription stay alive for 2s, which is >1s (minAlive).
|
||||
// Then force an error to end the subscription. The manager sees
|
||||
|
|
@ -407,13 +402,11 @@ func TestManager_Backoff_Pending_Token(t *testing.T) {
|
|||
defer cancel()
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
// We ignore the returned error because the Manager returns
|
||||
// nil on context cancel.
|
||||
_ = mgr.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait long enough to see at least 3 token calls, so we can see that
|
||||
// we'll indeed backoff when the token is pending.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
|
|
@ -124,9 +125,17 @@ func ReleaseRoutingPlugin(ctx context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if err := routingPluginInstance.Done(ctx); err != nil {
|
||||
log.Errorf("Error while releasing routing plugin: %v",
|
||||
err)
|
||||
// Use a timeout so a hanging Done call does not block the mutex
|
||||
// indefinitely, which would prevent other loop-outs from acquiring
|
||||
// the routing plugin.
|
||||
releaseCtx, cancel := context.WithTimeout(
|
||||
context.WithoutCancel(ctx), 30*time.Second,
|
||||
)
|
||||
defer cancel()
|
||||
|
||||
err := routingPluginInstance.Done(releaseCtx)
|
||||
if err != nil {
|
||||
log.Errorf("Error while releasing routing plugin: %v", err)
|
||||
}
|
||||
|
||||
routingPluginInstance = nil
|
||||
|
|
|
|||
|
|
@ -692,3 +692,51 @@ func TestRoutingPluginAcquireRelease(t *testing.T) {
|
|||
require.NotNil(t, plugin2)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// mockRoutingPlugin is a minimal RoutingPlugin used to capture the context
|
||||
// passed to Done.
|
||||
type mockRoutingPlugin struct {
|
||||
doneCtxErr error
|
||||
}
|
||||
|
||||
// Init is a no-op initializer for the mock plugin.
|
||||
func (m *mockRoutingPlugin) Init(_ context.Context, _ route.Vertex,
|
||||
_ [][]zpay32.HopHint, _ btcutil.Amount) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Done records ctx.Err() so tests can assert whether teardown ran with a live
|
||||
// context.
|
||||
func (m *mockRoutingPlugin) Done(ctx context.Context) error {
|
||||
m.doneCtxErr = ctx.Err()
|
||||
return nil
|
||||
}
|
||||
|
||||
// BeforePayment is a no-op hook for the mock plugin.
|
||||
func (m *mockRoutingPlugin) BeforePayment(_ context.Context, _, _ int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TestReleaseRoutingPluginUsesLiveContext checks that ReleaseRoutingPlugin does
|
||||
// not propagate caller cancellation to plugin teardown. The test cancels the
|
||||
// caller context before release and verifies mock Done still sees nil ctx.Err.
|
||||
func TestReleaseRoutingPluginUsesLiveContext(t *testing.T) {
|
||||
ReleaseRoutingPlugin(context.Background())
|
||||
t.Cleanup(func() {
|
||||
ReleaseRoutingPlugin(context.Background())
|
||||
})
|
||||
|
||||
mockPlugin := &mockRoutingPlugin{}
|
||||
|
||||
routingPluginMx.Lock()
|
||||
routingPluginInstance = mockPlugin
|
||||
routingPluginMx.Unlock()
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
|
||||
ReleaseRoutingPlugin(ctx)
|
||||
|
||||
require.NoError(t, mockPlugin.doneCtxErr)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,6 @@ type Store interface {
|
|||
// into the store.
|
||||
CreateStaticAddress(ctx context.Context, addrParams *Parameters) error
|
||||
|
||||
// GetStaticAddress fetches static address parameters for a given
|
||||
// address ID.
|
||||
GetStaticAddress(ctx context.Context, pkScript []byte) (*Parameters,
|
||||
error)
|
||||
|
||||
// GetAllStaticAddresses retrieves all static addresses from the store.
|
||||
GetAllStaticAddresses(ctx context.Context) ([]*Parameters,
|
||||
error)
|
||||
|
|
@ -33,7 +28,7 @@ type Parameters struct {
|
|||
// timeout path.
|
||||
ClientPubkey *btcec.PublicKey
|
||||
|
||||
// ClientPubkey is the client's pubkey for the static address. It is
|
||||
// ServerPubkey is the server's pubkey for the static address. It is
|
||||
// used for the 2-of-2 funding output.
|
||||
ServerPubkey *btcec.PublicKey
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ func (m *mockStaticAddressClient) ServerNewAddress(ctx context.Context,
|
|||
// TestManager tests the static address manager generates the corerct static
|
||||
// taproot address from the given test parameters.
|
||||
func TestManager(t *testing.T) {
|
||||
ctxb, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctxb := t.Context()
|
||||
|
||||
testContext := NewAddressManagerTestContext(t)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,18 +41,6 @@ func (s *SqlStore) CreateStaticAddress(ctx context.Context,
|
|||
return s.baseDB.Queries.CreateStaticAddress(ctx, createArgs)
|
||||
}
|
||||
|
||||
// GetStaticAddress retrieves static address parameters for a given pkScript.
|
||||
func (s *SqlStore) GetStaticAddress(ctx context.Context,
|
||||
pkScript []byte) (*Parameters, error) {
|
||||
|
||||
staticAddress, err := s.baseDB.Queries.GetStaticAddress(ctx, pkScript)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s.toAddressParameters(staticAddress)
|
||||
}
|
||||
|
||||
// GetAllStaticAddresses returns all address known to the server.
|
||||
func (s *SqlStore) GetAllStaticAddresses(ctx context.Context) ([]*Parameters,
|
||||
error) {
|
||||
|
|
@ -75,11 +63,6 @@ func (s *SqlStore) GetAllStaticAddresses(ctx context.Context) ([]*Parameters,
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// Close closes the database connection.
|
||||
func (s *SqlStore) Close() {
|
||||
s.baseDB.DB.Close()
|
||||
}
|
||||
|
||||
// toAddressParameters transforms a database representation of a static address
|
||||
// to an AddressParameters struct.
|
||||
func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) (
|
||||
|
|
|
|||
|
|
@ -475,33 +475,33 @@ func isUpdateSkipped(notification fsm.Notification,
|
|||
}
|
||||
|
||||
// Infof logs an info message with the deposit outpoint.
|
||||
func (f *FSM) Infof(format string, args ...interface{}) {
|
||||
func (f *FSM) Infof(format string, args ...any) {
|
||||
log.Infof(
|
||||
"Deposit %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.deposit.OutPoint},
|
||||
[]any{f.deposit.OutPoint},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
}
|
||||
|
||||
// Debugf logs a debug message with the deposit outpoint.
|
||||
func (f *FSM) Debugf(format string, args ...interface{}) {
|
||||
func (f *FSM) Debugf(format string, args ...any) {
|
||||
log.Debugf(
|
||||
"Deposit %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.deposit.OutPoint},
|
||||
[]any{f.deposit.OutPoint},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
}
|
||||
|
||||
// Errorf logs an error message with the deposit outpoint.
|
||||
func (f *FSM) Errorf(format string, args ...interface{}) {
|
||||
func (f *FSM) Errorf(format string, args ...any) {
|
||||
log.Errorf(
|
||||
"Deposit %v: "+format,
|
||||
append(
|
||||
[]interface{}{f.deposit.OutPoint},
|
||||
[]any{f.deposit.OutPoint},
|
||||
args...,
|
||||
)...,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,13 +8,10 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcd/txscript"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop"
|
||||
"github.com/lightninglabs/loop/fsm"
|
||||
staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
|
||||
"github.com/lightningnetwork/lnd/lnwallet"
|
||||
)
|
||||
|
|
@ -40,17 +37,10 @@ const (
|
|||
|
||||
// ManagerConfig holds the configuration for the address manager.
|
||||
type ManagerConfig struct {
|
||||
// AddressClient is the client that communicates with the loop server
|
||||
// to manage static addresses.
|
||||
AddressClient staticaddressrpc.StaticAddressServerClient
|
||||
|
||||
// AddressManager is the address manager that is used to fetch static
|
||||
// address parameters.
|
||||
AddressManager AddressManager
|
||||
|
||||
// SwapClient provides loop rpc functionality.
|
||||
SwapClient *loop.Client
|
||||
|
||||
// Store is the database store that is used to store static address
|
||||
// related records.
|
||||
Store Store
|
||||
|
|
@ -59,10 +49,6 @@ type ManagerConfig struct {
|
|||
// lnd's wallet.
|
||||
WalletKit lndclient.WalletKitClient
|
||||
|
||||
// ChainParams is the chain configuration(mainnet, testnet...) this
|
||||
// manager uses.
|
||||
ChainParams *chaincfg.Params
|
||||
|
||||
// ChainNotifier is the chain notifier that is used to listen for new
|
||||
// blocks.
|
||||
ChainNotifier lndclient.ChainNotifierClient
|
||||
|
|
@ -208,7 +194,7 @@ func (m *Manager) recoverDeposits(ctx context.Context) error {
|
|||
go func(fsm *FSM) {
|
||||
err := fsm.SendEvent(ctx, OnRecover, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnStart event: %v",
|
||||
log.Errorf("Error sending OnRecover event: %v",
|
||||
err)
|
||||
}
|
||||
}(fsm)
|
||||
|
|
@ -393,7 +379,7 @@ func (m *Manager) startDepositFsm(ctx context.Context, deposit *Deposit) error {
|
|||
|
||||
// Send the start event to the state machine.
|
||||
go func() {
|
||||
err = fsm.SendEvent(ctx, OnStart, nil)
|
||||
err := fsm.SendEvent(ctx, OnStart, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnStart event: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -345,11 +345,9 @@ func newManagerTestContext(t *testing.T) *ManagerTestContext {
|
|||
)
|
||||
|
||||
cfg := &ManagerConfig{
|
||||
AddressClient: mockStaticAddressClient,
|
||||
AddressManager: mockAddressManager,
|
||||
Store: mockStore,
|
||||
WalletKit: mockLnd.WalletKit,
|
||||
ChainParams: mockLnd.ChainParams,
|
||||
ChainNotifier: mockChainNotifier,
|
||||
Signer: mockLnd.Signer,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -705,6 +705,10 @@ func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context,
|
|||
}
|
||||
}
|
||||
|
||||
// htlcTimeoutSweepRetryDelay is the delay between retries when publishing the
|
||||
// htlc timeout sweep transaction fails.
|
||||
const htlcTimeoutSweepRetryDelay = time.Hour
|
||||
|
||||
// SweepHtlcTimeoutAction is called if the server published the htlc tx without
|
||||
// paying the invoice. We wait for the timeout path to open up and sweep the
|
||||
// funds back to us.
|
||||
|
|
@ -714,22 +718,22 @@ func (f *FSM) SweepHtlcTimeoutAction(ctx context.Context,
|
|||
for {
|
||||
err := f.createAndPublishHtlcTimeoutSweepTx(ctx)
|
||||
if err == nil {
|
||||
break
|
||||
return OnHtlcTimeoutSweepPublished
|
||||
}
|
||||
|
||||
f.Errorf("unable to create and publish htlc timeout sweep "+
|
||||
"tx: %v, retrying in %v", err, time.Hour.String())
|
||||
"tx: %v, retrying in %v", err, htlcTimeoutSweepRetryDelay)
|
||||
|
||||
select {
|
||||
// The context is cancelled when the server is shutting
|
||||
// down. In that case we give up broadcasting attempts
|
||||
// and return an error.
|
||||
case <-ctx.Done():
|
||||
f.Errorf("%v", ctx.Err())
|
||||
return f.HandleError(ctx.Err())
|
||||
|
||||
default:
|
||||
<-time.After(1 * time.Hour)
|
||||
case <-time.After(htlcTimeoutSweepRetryDelay):
|
||||
}
|
||||
}
|
||||
|
||||
return OnHtlcTimeoutSweepPublished
|
||||
}
|
||||
|
||||
// MonitorHtlcTimeoutSweepAction is called after the htlc timeout sweep tx has
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ func isUpdateSkipped(notification fsm.Notification,
|
|||
}
|
||||
|
||||
// Infof logs an info message with the loop-in swap hash.
|
||||
func (f *FSM) Infof(format string, args ...interface{}) {
|
||||
func (f *FSM) Infof(format string, args ...any) {
|
||||
if f.loopIn == nil {
|
||||
log.Infof(format, args...)
|
||||
return
|
||||
|
|
@ -315,7 +315,7 @@ func (f *FSM) Infof(format string, args ...interface{}) {
|
|||
}
|
||||
|
||||
// Debugf logs a debug message with the loop-in swap hash.
|
||||
func (f *FSM) Debugf(format string, args ...interface{}) {
|
||||
func (f *FSM) Debugf(format string, args ...any) {
|
||||
if f.loopIn == nil {
|
||||
log.Debugf(format, args...)
|
||||
return
|
||||
|
|
@ -327,7 +327,7 @@ func (f *FSM) Debugf(format string, args ...interface{}) {
|
|||
}
|
||||
|
||||
// Warnf logs a warning message with the loop-in swap hash.
|
||||
func (f *FSM) Warnf(format string, args ...interface{}) {
|
||||
func (f *FSM) Warnf(format string, args ...any) {
|
||||
if f.loopIn == nil {
|
||||
log.Warnf(format, args...)
|
||||
return
|
||||
|
|
@ -339,7 +339,7 @@ func (f *FSM) Warnf(format string, args ...interface{}) {
|
|||
}
|
||||
|
||||
// Errorf logs an error message with the loop-in swap hash.
|
||||
func (f *FSM) Errorf(format string, args ...interface{}) {
|
||||
func (f *FSM) Errorf(format string, args ...any) {
|
||||
if f.loopIn == nil {
|
||||
log.Errorf(format, args...)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ type StaticAddressLoopIn struct {
|
|||
// probing and payment.
|
||||
Private bool
|
||||
|
||||
// Optional route hints to reach the destination through private
|
||||
// channels.
|
||||
// RouteHints are optional route hints to reach the destination through
|
||||
// private channels.
|
||||
RouteHints [][]zpay32.HopHint
|
||||
|
||||
// Deposits are the deposits that are part of the loop-in swap. They
|
||||
|
|
@ -291,7 +291,8 @@ func (l *StaticAddressLoopIn) createHtlcTx(chainParams *chaincfg.Params,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Create the sweep output
|
||||
// Create the sweep output. NOTE: The HTLC output must be added at
|
||||
// index 0. createHtlcSweepTx relies on this layout invariant.
|
||||
sweepOutput := &wire.TxOut{
|
||||
Value: int64(swapAmt - fee),
|
||||
PkScript: pkscript,
|
||||
|
|
@ -320,7 +321,7 @@ func (l *StaticAddressLoopIn) isHtlcTimedOut(height int32) bool {
|
|||
// htlcWeight returns the weight for the htlc transaction.
|
||||
func (l *StaticAddressLoopIn) htlcWeight(hasChange bool) lntypes.WeightUnit {
|
||||
var weightEstimator input.TxWeightEstimator
|
||||
for i := 0; i < len(l.Deposits); i++ {
|
||||
for range len(l.Deposits) {
|
||||
weightEstimator.AddTaprootKeySpendInput(
|
||||
txscript.SigHashDefault,
|
||||
)
|
||||
|
|
@ -370,17 +371,18 @@ func (l *StaticAddressLoopIn) createHtlcSweepTx(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Check if the htlc tx has a change output. If so we need to select the
|
||||
// non-change output index to construct the sweep with.
|
||||
htlcInputIndex := uint32(0)
|
||||
// The HTLC output is always at index 0 (createHtlcTx adds it first).
|
||||
// If there is a change output, it is at index 1. Verify this invariant
|
||||
// so we fail fast if createHtlcTx's layout ever changes.
|
||||
const htlcInputIndex = uint32(0)
|
||||
if len(htlcTx.TxOut) == 2 {
|
||||
// If the first htlc tx output matches our static address
|
||||
// script we need to select the second output to sweep from.
|
||||
if bytes.Equal(
|
||||
htlcTx.TxOut[0].PkScript, l.AddressParams.PkScript,
|
||||
) {
|
||||
|
||||
htlcInputIndex = 1
|
||||
return nil, fmt.Errorf("htlc tx output layout " +
|
||||
"invariant violated: expected HTLC output " +
|
||||
"at index 0, got change output")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -402,7 +404,7 @@ func (l *StaticAddressLoopIn) createHtlcSweepTx(ctx context.Context,
|
|||
|
||||
fee := feeRate.FeeForWeight(weightEstimator.Weight())
|
||||
|
||||
htlcOutValue := htlcTx.TxOut[0].Value
|
||||
htlcOutValue := htlcTx.TxOut[htlcInputIndex].Value
|
||||
output := &wire.TxOut{
|
||||
Value: htlcOutValue - int64(fee),
|
||||
PkScript: sweepPkScript,
|
||||
|
|
|
|||
158
staticaddr/loopin/loopin_test.go
Normal file
158
staticaddr/loopin/loopin_test.go
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
package loopin
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/loop/staticaddr/address"
|
||||
"github.com/lightninglabs/loop/staticaddr/deposit"
|
||||
"github.com/lightninglabs/loop/staticaddr/script"
|
||||
"github.com/lightninglabs/loop/staticaddr/version"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// noopSigner is a minimal SignerClient mock that returns dummy signatures
|
||||
// without blocking on channels.
|
||||
type noopSigner struct {
|
||||
lndclient.SignerClient
|
||||
}
|
||||
|
||||
// SignOutputRaw returns dummy 64-byte signatures for each sign descriptor.
|
||||
func (s *noopSigner) SignOutputRaw(_ context.Context, _ *wire.MsgTx,
|
||||
descs []*lndclient.SignDescriptor, _ []*wire.TxOut) ([][]byte, error) {
|
||||
|
||||
sigs := make([][]byte, len(descs))
|
||||
for i := range descs {
|
||||
sigs[i] = make([]byte, 64)
|
||||
}
|
||||
|
||||
return sigs, nil
|
||||
}
|
||||
|
||||
// TestCreateHtlcSweepTxSweepValue verifies that createHtlcSweepTx derives the
|
||||
// sweep output value from the HTLC output, not the change output. When a change
|
||||
// output is present, the sweep must reference the HTLC output value.
|
||||
func TestCreateHtlcSweepTxSweepValue(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
clientKey, err := btcec.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
serverKey, err := btcec.NewPrivateKey()
|
||||
require.NoError(t, err)
|
||||
|
||||
network := &chaincfg.RegressionNetParams
|
||||
swapHash := lntypes.Hash{1, 2, 3}
|
||||
|
||||
// Create a static address to derive PkScript.
|
||||
staticAddr, err := newStaticAddress(
|
||||
clientKey.PubKey(), serverKey.PubKey(), 4032,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
pkScript, err := staticAddr.StaticAddressScript()
|
||||
require.NoError(t, err)
|
||||
|
||||
addrParams := &address.Parameters{
|
||||
ClientPubkey: clientKey.PubKey(),
|
||||
ServerPubkey: serverKey.PubKey(),
|
||||
PkScript: pkScript,
|
||||
Expiry: 4032,
|
||||
ProtocolVersion: version.ProtocolVersion_V0,
|
||||
}
|
||||
|
||||
depositValue := btcutil.Amount(500_000)
|
||||
deposits := []*deposit.Deposit{
|
||||
{
|
||||
OutPoint: wire.OutPoint{
|
||||
Hash: chainhash.Hash{0xaa},
|
||||
Index: 0,
|
||||
},
|
||||
Value: depositValue,
|
||||
},
|
||||
}
|
||||
|
||||
feeRate := chainfee.SatPerKWeight(253)
|
||||
maxFeePercentage := 0.2
|
||||
|
||||
// SelectedAmount < total triggers a change output.
|
||||
selectedAmount := btcutil.Amount(300_000)
|
||||
|
||||
loopIn := &StaticAddressLoopIn{
|
||||
SwapHash: swapHash,
|
||||
HtlcCltvExpiry: 800,
|
||||
InitiationHeight: 100,
|
||||
InitiationTime: time.Now(),
|
||||
ProtocolVersion: version.ProtocolVersion_V0,
|
||||
ClientPubkey: clientKey.PubKey(),
|
||||
ServerPubkey: serverKey.PubKey(),
|
||||
Deposits: deposits,
|
||||
AddressParams: addrParams,
|
||||
HtlcTxFeeRate: feeRate,
|
||||
SelectedAmount: selectedAmount,
|
||||
PaymentTimeoutSeconds: 3600,
|
||||
}
|
||||
|
||||
sweepAddr, err := btcutil.NewAddressTaproot(
|
||||
make([]byte, 32), network,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
signer := &noopSigner{}
|
||||
|
||||
// Build the HTLC transaction once. It has two outputs with distinct
|
||||
// values: the HTLC output and a change output.
|
||||
htlcTx, err := loopIn.createHtlcTx(network, feeRate, maxFeePercentage)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, htlcTx.TxOut, 2, "expected HTLC + change outputs")
|
||||
|
||||
// Identify which output is change and which is HTLC.
|
||||
var htlcIdx int
|
||||
if bytes.Equal(htlcTx.TxOut[0].PkScript, pkScript) {
|
||||
htlcIdx = 1
|
||||
}
|
||||
|
||||
htlcValue := htlcTx.TxOut[htlcIdx].Value
|
||||
changeValue := htlcTx.TxOut[1-htlcIdx].Value
|
||||
require.NotEqual(t, htlcValue, changeValue,
|
||||
"HTLC and change values must differ for this test to be "+
|
||||
"meaningful")
|
||||
|
||||
// Call createHtlcSweepTx and verify that the sweep output is derived
|
||||
// from the HTLC value, not the change.
|
||||
sweepTx, err := loopIn.createHtlcSweepTx(
|
||||
t.Context(), signer, sweepAddr, feeRate,
|
||||
network, uint32(loopIn.HtlcCltvExpiry)+1,
|
||||
maxFeePercentage,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, sweepTx.TxOut, 1)
|
||||
|
||||
sweepValue := sweepTx.TxOut[0].Value
|
||||
require.Greater(t, sweepValue, int64(0))
|
||||
require.LessOrEqual(t, sweepValue, htlcValue,
|
||||
"sweep value must not exceed HTLC output value")
|
||||
require.Greater(t, sweepValue, changeValue,
|
||||
"sweep value should be greater than change "+
|
||||
"value, confirming it was derived from "+
|
||||
"the HTLC output")
|
||||
}
|
||||
|
||||
// newStaticAddress creates a StaticAddress for testing.
|
||||
func newStaticAddress(clientKey, serverKey *btcec.PublicKey,
|
||||
csvExpiry int64) (*script.StaticAddress, error) {
|
||||
|
||||
return script.NewStaticAddress(
|
||||
input.MuSig2Version100RC2, csvExpiry, clientKey, serverKey,
|
||||
)
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
"sort"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
|
@ -60,10 +61,10 @@ type Config struct {
|
|||
// cancel invoices.
|
||||
InvoicesClient lndclient.InvoicesClient
|
||||
|
||||
// SwapClient is used to get loop in quotes.
|
||||
// QuoteGetter is used to get loop-in quotes.
|
||||
QuoteGetter QuoteGetter
|
||||
|
||||
// NodePubKey is used to get a loo-in quote.
|
||||
// NodePubkey is used to get a loop-in quote.
|
||||
NodePubkey route.Vertex
|
||||
|
||||
// WalletKit is the wallet client that is used to derive new keys from
|
||||
|
|
@ -74,7 +75,7 @@ type Config struct {
|
|||
// manager uses.
|
||||
ChainParams *chaincfg.Params
|
||||
|
||||
// Chain is the chain notifier that is used to listen for new
|
||||
// ChainNotifier is the chain notifier that is used to listen for new
|
||||
// blocks.
|
||||
ChainNotifier lndclient.ChainNotifierClient
|
||||
|
||||
|
|
@ -134,13 +135,8 @@ type Manager struct {
|
|||
// has been canceled.
|
||||
exitChan chan struct{}
|
||||
|
||||
// errChan forwards errors from the loop-in manager to the server.
|
||||
errChan chan error
|
||||
|
||||
// currentHeight stores the currently best known block height.
|
||||
currentHeight atomic.Uint32
|
||||
|
||||
activeLoopIns map[lntypes.Hash]*FSM
|
||||
}
|
||||
|
||||
// NewManager creates a new deposit withdrawal manager.
|
||||
|
|
@ -154,8 +150,6 @@ func NewManager(cfg *Config, currentHeight uint32) (*Manager, error) {
|
|||
cfg: cfg,
|
||||
newLoopInChan: make(chan *newSwapRequest),
|
||||
exitChan: make(chan struct{}),
|
||||
errChan: make(chan error),
|
||||
activeLoopIns: make(map[lntypes.Hash]*FSM),
|
||||
}
|
||||
m.currentHeight.Store(currentHeight)
|
||||
|
||||
|
|
@ -566,25 +560,20 @@ func (m *Manager) recoverLoopIns(ctx context.Context) error {
|
|||
}
|
||||
|
||||
// Create a state machine for a given loop-in.
|
||||
var (
|
||||
recovery = true
|
||||
fsm *FSM
|
||||
)
|
||||
fsm, err = NewFSM(ctx, loopIn, m.cfg, recovery)
|
||||
recovery := true
|
||||
fsm, err := NewFSM(ctx, loopIn, m.cfg, recovery)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Send the OnRecover event to the state machine.
|
||||
go func(fsm *FSM, swapHash lntypes.Hash) {
|
||||
go func() {
|
||||
err := fsm.SendEvent(ctx, OnRecover, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnStart event: %v",
|
||||
err)
|
||||
log.Errorf("Error sending OnRecover "+
|
||||
"event: %v", err)
|
||||
}
|
||||
|
||||
m.activeLoopIns[swapHash] = fsm
|
||||
}(fsm, loopIn.SwapHash)
|
||||
}()
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
@ -807,9 +796,9 @@ func (m *Manager) startLoopInFsm(ctx context.Context,
|
|||
|
||||
// Send the start event to the state machine.
|
||||
go func() {
|
||||
err = loopInFsm.SendEvent(ctx, OnInitHtlc, nil)
|
||||
err := loopInFsm.SendEvent(ctx, OnInitHtlc, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnNewRequest event: %v", err)
|
||||
log.Errorf("Error sending OnInitHtlc event: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
@ -823,8 +812,6 @@ func (m *Manager) startLoopInFsm(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
m.activeLoopIns[loopIn.SwapHash] = loopInFsm
|
||||
|
||||
return loopIn, nil
|
||||
}
|
||||
|
||||
|
|
@ -1000,14 +987,7 @@ func mapDepositsToIndices(
|
|||
|
||||
depositToIdxMap := make(map[string]int)
|
||||
for reqOutpoint := range req.DepositToNonces {
|
||||
hasDeposit := false
|
||||
for _, depositOutpoint := range loopIn.DepositOutpoints {
|
||||
if depositOutpoint == reqOutpoint {
|
||||
hasDeposit = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasDeposit {
|
||||
if !slices.Contains(loopIn.DepositOutpoints, reqOutpoint) {
|
||||
return nil, fmt.Errorf("deposit outpoint not part of " +
|
||||
"loop-in")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,24 +6,11 @@ import (
|
|||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightninglabs/loop/fsm"
|
||||
"github.com/lightninglabs/loop/staticaddr/address"
|
||||
"github.com/lightninglabs/loop/staticaddr/deposit"
|
||||
"github.com/lightninglabs/loop/staticaddr/script"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
)
|
||||
|
||||
// AddressManager handles fetching of address parameters.
|
||||
type AddressManager interface {
|
||||
// GetStaticAddressParameters returns the static address parameters.
|
||||
GetStaticAddressParameters(ctx context.Context) (*address.Parameters,
|
||||
error)
|
||||
|
||||
// GetStaticAddress returns the deposit address for the given
|
||||
// client and server public keys.
|
||||
GetStaticAddress(ctx context.Context) (*script.StaticAddress, error)
|
||||
}
|
||||
|
||||
type DepositManager interface {
|
||||
// AllOutpointsActiveDeposits returns all deposits that are in the
|
||||
// given state. If the state filter is fsm.StateTypeNone, all deposits
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import (
|
|||
"github.com/lightninglabs/loop/staticaddr/deposit"
|
||||
"github.com/lightninglabs/loop/staticaddr/staticutil"
|
||||
"github.com/lightninglabs/loop/staticaddr/withdraw"
|
||||
serverrpc "github.com/lightninglabs/loop/swapserverrpc"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
||||
|
|
@ -31,7 +30,8 @@ const (
|
|||
// channel opening.
|
||||
defaultUtxoMinConf = 1
|
||||
|
||||
// Is the default confirmation target for a channel open transaction.
|
||||
// defaultConfTarget is the default confirmation target for a channel
|
||||
// open transaction.
|
||||
defaultConfTarget int32 = 3
|
||||
)
|
||||
|
||||
|
|
@ -47,14 +47,6 @@ var (
|
|||
|
||||
// Config is the configuration struct for the open channel manager.
|
||||
type Config struct {
|
||||
// StaticAddressServerClient is the client that calls the swap server
|
||||
// rpcs to negotiate static address withdrawals.
|
||||
Server serverrpc.StaticAddressServerClient
|
||||
|
||||
// AddressManager gives the withdrawal manager access to static address
|
||||
// parameters.
|
||||
AddressManager AddressManager
|
||||
|
||||
// DepositManager gives the withdrawal manager access to the deposits
|
||||
// enabling it to create and manage withdrawals.
|
||||
DepositManager DepositManager
|
||||
|
|
@ -71,13 +63,6 @@ type Config struct {
|
|||
// manager uses.
|
||||
ChainParams *chaincfg.Params
|
||||
|
||||
// ChainNotifier is the chain notifier that is used to listen for new
|
||||
// blocks.
|
||||
ChainNotifier lndclient.ChainNotifierClient
|
||||
|
||||
// Signer is the signer client that is used to sign transactions.
|
||||
Signer lndclient.SignerClient
|
||||
|
||||
// LightningClient is the lnd client that is used to open channels.
|
||||
LightningClient lndclient.LightningClient
|
||||
}
|
||||
|
|
@ -91,7 +76,7 @@ type newOpenChannelResponse struct {
|
|||
// ChanOutpoint is the outpoint of the channel open transaction.
|
||||
ChanOutpoint *wire.OutPoint
|
||||
|
||||
// Err is the error that occurred during the channel open process.
|
||||
// err is the error that occurred during the channel open process.
|
||||
err error
|
||||
}
|
||||
|
||||
|
|
@ -103,9 +88,6 @@ type Manager struct {
|
|||
|
||||
// exitChan signals subroutines that the open channel is exiting.
|
||||
exitChan chan struct{}
|
||||
|
||||
// errChan forwards errors from the open channel to the server.
|
||||
errChan chan error
|
||||
}
|
||||
|
||||
// NewManager creates a new manager instance.
|
||||
|
|
@ -114,7 +96,6 @@ func NewManager(cfg *Config) *Manager {
|
|||
cfg: cfg,
|
||||
exitChan: make(chan struct{}),
|
||||
newOpenChannelRequestChan: make(chan newOpenChannelRequest),
|
||||
errChan: make(chan error),
|
||||
}
|
||||
|
||||
return m
|
||||
|
|
@ -477,9 +458,7 @@ func (m *Manager) openChannelPsbt(ctx context.Context,
|
|||
log.Infof("Starting PSBT funding flow with pending channel ID %x.\n",
|
||||
pendingChanID)
|
||||
|
||||
// maybeCancelShim is a helper function that cancels the funding shim
|
||||
// with the RPC server in case we end up aborting early.
|
||||
maybeCancelShim := func() {
|
||||
defer func() {
|
||||
shimMu.Lock()
|
||||
defer shimMu.Unlock()
|
||||
|
||||
|
|
@ -497,15 +476,14 @@ func (m *Manager) openChannelPsbt(ctx context.Context,
|
|||
},
|
||||
}
|
||||
_, err := m.cfg.LightningClient.FundingStateStep(
|
||||
ctx, cancelMsg,
|
||||
context.WithoutCancel(ctx), cancelMsg,
|
||||
)
|
||||
if err != nil {
|
||||
log.Errorf("Error canceling shim: %v\n", err)
|
||||
}
|
||||
shimPending = false
|
||||
}
|
||||
}
|
||||
defer maybeCancelShim()
|
||||
}()
|
||||
|
||||
// Create the PSBT funding shim that will tell the funding manager we
|
||||
// want to use a PSBT.
|
||||
|
|
|
|||
|
|
@ -608,9 +608,10 @@ type mockLndClient struct {
|
|||
|
||||
rawClient lnrpc.LightningClient
|
||||
|
||||
mu sync.Mutex
|
||||
fundingStepIdx int
|
||||
fundingStepErr error
|
||||
mu sync.Mutex
|
||||
fundingStepIdx int
|
||||
fundingStepErr error
|
||||
fundingStepCtxErrs []error
|
||||
}
|
||||
|
||||
func (m *mockLndClient) RawClientWithMacAuth(
|
||||
|
|
@ -620,13 +621,14 @@ func (m *mockLndClient) RawClientWithMacAuth(
|
|||
return ctx, 0, m.rawClient
|
||||
}
|
||||
|
||||
func (m *mockLndClient) FundingStateStep(_ context.Context,
|
||||
func (m *mockLndClient) FundingStateStep(ctx context.Context,
|
||||
_ *lnrpc.FundingTransitionMsg) (*lnrpc.FundingStateStepResp, error) {
|
||||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
|
||||
m.fundingStepIdx++
|
||||
m.fundingStepCtxErrs = append(m.fundingStepCtxErrs, ctx.Err())
|
||||
|
||||
return &lnrpc.FundingStateStepResp{}, m.fundingStepErr
|
||||
}
|
||||
|
|
@ -658,8 +660,8 @@ func (m *mockClientStream) CloseSend() error { return nil }
|
|||
func (m *mockClientStream) Context() context.Context {
|
||||
return context.Background()
|
||||
}
|
||||
func (m *mockClientStream) SendMsg(_ interface{}) error { return nil }
|
||||
func (m *mockClientStream) RecvMsg(_ interface{}) error { return nil }
|
||||
func (m *mockClientStream) SendMsg(_ any) error { return nil }
|
||||
func (m *mockClientStream) RecvMsg(_ any) error { return nil }
|
||||
|
||||
// mockOpenChanStream implements lnrpc.Lightning_OpenChannelClient. It returns
|
||||
// queued messages from Recv(), then returns finalErr once the queue is
|
||||
|
|
@ -746,6 +748,43 @@ func TestStreamOpenError(t *testing.T) {
|
|||
// Verify that the shim was canceled via FundingStateStep.
|
||||
lnClient.mu.Lock()
|
||||
require.Equal(t, 1, lnClient.fundingStepIdx)
|
||||
require.Len(t, lnClient.fundingStepCtxErrs, 1)
|
||||
require.NoError(t, lnClient.fundingStepCtxErrs[0])
|
||||
lnClient.mu.Unlock()
|
||||
}
|
||||
|
||||
// TestStreamOpenErrorWithCanceledContext verifies that deferred shim cleanup
|
||||
// still uses a live context even if the caller canceled the original request.
|
||||
func TestStreamOpenErrorWithCanceledContext(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
mockRaw := &mockRawLnrpcClient{
|
||||
openErr: errors.New("connection refused"),
|
||||
}
|
||||
lnClient := &mockLndClient{rawClient: mockRaw}
|
||||
|
||||
manager := &Manager{
|
||||
cfg: &Config{
|
||||
LightningClient: lnClient,
|
||||
ChainParams: &chaincfg.RegressionNetParams,
|
||||
},
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
|
||||
req := &lnrpc.OpenChannelRequest{
|
||||
LocalFundingAmount: 100000,
|
||||
MinConfs: defaultUtxoMinConf,
|
||||
}
|
||||
|
||||
_, err := manager.openChannelPsbt(ctx, req, nil, 0)
|
||||
require.ErrorContains(t, err, "opening stream to server failed")
|
||||
|
||||
lnClient.mu.Lock()
|
||||
require.Equal(t, 1, lnClient.fundingStepIdx)
|
||||
require.Len(t, lnClient.fundingStepCtxErrs, 1)
|
||||
require.NoError(t, lnClient.fundingStepCtxErrs[0])
|
||||
lnClient.mu.Unlock()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ func CreateMusig2Sessions(ctx context.Context,
|
|||
clientNonces := make([][]byte, len(deposits))
|
||||
|
||||
// Create the sessions and nonces from the deposits.
|
||||
for i := 0; i < len(deposits); i++ {
|
||||
for i := range len(deposits) {
|
||||
session, err := CreateMusig2Session(
|
||||
ctx, signer, addrParams, staticAddress,
|
||||
)
|
||||
|
|
@ -161,7 +161,7 @@ func bip69inputLess(input1, input2 *swapserverrpc.PrevoutInfo) bool {
|
|||
// At this point, the hashes are not equal, so reverse them to
|
||||
// big-endian and return the result of the comparison.
|
||||
const hashSize = chainhash.HashSize
|
||||
for b := 0; b < hashSize/2; b++ {
|
||||
for b := range hashSize / 2 {
|
||||
ihash[b], ihash[hashSize-1-b] = ihash[hashSize-1-b], ihash[b]
|
||||
jhash[b], jhash[hashSize-1-b] = jhash[hashSize-1-b], jhash[b]
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ func estimateFee(numInputs int, feeRate chainfee.SatPerKWeight,
|
|||
commitmentType lnrpc.CommitmentType) btcutil.Amount {
|
||||
|
||||
var we input.TxWeightEstimator
|
||||
for i := 0; i < numInputs; i++ {
|
||||
for range numInputs {
|
||||
we.AddTaprootKeySpendInput(txscript.SigHashDefault)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,18 +10,6 @@ import (
|
|||
"github.com/lightninglabs/loop/staticaddr/script"
|
||||
)
|
||||
|
||||
// Store is the database interface that is used to store and retrieve
|
||||
// static address withdrawals.
|
||||
type Store interface {
|
||||
// CreateWithdrawal inserts a withdrawal into the store.
|
||||
CreateWithdrawal(ctx context.Context, tx *wire.MsgTx,
|
||||
confirmationHeight uint32, deposits []*deposit.Deposit,
|
||||
changePkScript []byte) error
|
||||
|
||||
// GetAllWithdrawals retrieves all withdrawals.
|
||||
GetAllWithdrawals(ctx context.Context) ([]Withdrawal, error)
|
||||
}
|
||||
|
||||
// AddressManager handles fetching of address parameters.
|
||||
type AddressManager interface {
|
||||
// GetStaticAddressParameters returns the static address parameters.
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import (
|
|||
"github.com/lightninglabs/loop/staticaddr/deposit"
|
||||
"github.com/lightninglabs/loop/staticaddr/staticutil"
|
||||
staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/funding"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
|
|
@ -130,14 +129,11 @@ type Manager struct {
|
|||
// exitChan signals subroutines that the withdrawal manager is exiting.
|
||||
exitChan chan struct{}
|
||||
|
||||
// errChan forwards errors from the withdrawal manager to the server.
|
||||
errChan chan error
|
||||
|
||||
// initiationHeight stores the currently best known block height.
|
||||
initiationHeight atomic.Uint32
|
||||
|
||||
// finalizedWithdrawalTx are the finalized withdrawal transactions that
|
||||
// are published to the network and re-published on block arrivals.
|
||||
// finalizedWithdrawalTxns are the finalized withdrawal transactions
|
||||
// that are published to the network and re-published on block arrivals.
|
||||
finalizedWithdrawalTxns map[chainhash.Hash]*wire.MsgTx
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +149,6 @@ func NewManager(cfg *ManagerConfig, currentHeight uint32) (*Manager, error) {
|
|||
finalizedWithdrawalTxns: make(map[chainhash.Hash]*wire.MsgTx),
|
||||
exitChan: make(chan struct{}),
|
||||
newWithdrawalRequestChan: make(chan newWithdrawalRequest),
|
||||
errChan: make(chan error),
|
||||
}
|
||||
m.initiationHeight.Store(currentHeight)
|
||||
|
||||
|
|
@ -666,7 +661,7 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
|
|||
|
||||
addrParams, err := m.cfg.AddressManager.GetStaticAddressParameters(ctx)
|
||||
if err != nil {
|
||||
log.Errorf("error retrieving address params %w", err)
|
||||
log.Errorf("error retrieving address params: %v", err)
|
||||
|
||||
return fmt.Errorf("withdrawal failed")
|
||||
}
|
||||
|
|
@ -676,6 +671,9 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
|
|||
ctx, &d.OutPoint, addrParams.PkScript,
|
||||
int32(d.ConfirmationHeight),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to register spend ntfn: %w", err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
select {
|
||||
|
|
@ -684,13 +682,21 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
|
|||
// If the transaction received one confirmation, we
|
||||
// ensure re-org safety by waiting for some more
|
||||
// confirmations.
|
||||
var confChan chan *chainntnfs.TxConfirmation
|
||||
confChan, errChan, err =
|
||||
confChan, confErrChan, err :=
|
||||
m.cfg.ChainNotifier.RegisterConfirmationsNtfn(
|
||||
ctx, spentTx.SpenderTxHash,
|
||||
withdrawalPkscript, MinConfs,
|
||||
int32(m.initiationHeight.Load()),
|
||||
)
|
||||
if err != nil {
|
||||
// TODO(#1087): Retry registration on
|
||||
// next block instead of giving up.
|
||||
log.Errorf("Error registering confirmation "+
|
||||
"notification: %v", err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
case tx := <-confChan:
|
||||
err = m.cfg.DepositManager.TransitionDeposits(
|
||||
|
|
@ -719,7 +725,9 @@ func (m *Manager) handleWithdrawal(ctx context.Context,
|
|||
"withdrawal: %v", err)
|
||||
}
|
||||
|
||||
case err := <-errChan:
|
||||
case err := <-confErrChan:
|
||||
// TODO(#1087): Handle reorgs by retrying
|
||||
// confirmation registration on next block.
|
||||
log.Errorf("Error waiting for confirmation: %v",
|
||||
err)
|
||||
|
||||
|
|
@ -1073,7 +1081,7 @@ func WithdrawalTxWeight(numInputs int, sweepAddress btcutil.Address,
|
|||
hasChange bool) (lntypes.WeightUnit, error) {
|
||||
|
||||
var weightEstimator input.TxWeightEstimator
|
||||
for i := 0; i < numInputs; i++ {
|
||||
for range numInputs {
|
||||
weightEstimator.AddTaprootKeySpendInput(
|
||||
txscript.SigHashDefault,
|
||||
)
|
||||
|
|
|
|||
6
swap.go
6
swap.go
|
|
@ -50,10 +50,12 @@ func newSwapKit(hash lntypes.Hash, swapType swap.Type, cfg *swapConfig,
|
|||
}
|
||||
}
|
||||
|
||||
// IsTaproot returns true if the swap referenced by the passed swap contract
|
||||
// IsTaprootSwap returns true if the swap referenced by the passed swap contract
|
||||
// uses the v3 (taproot) htlc.
|
||||
func IsTaprootSwap(swapContract *loopdb.SwapContract) bool {
|
||||
return utils.GetHtlcScriptVersion(swapContract.ProtocolVersion) == swap.HtlcV3
|
||||
version := utils.GetHtlcScriptVersion(swapContract.ProtocolVersion)
|
||||
|
||||
return version == swap.HtlcV3
|
||||
}
|
||||
|
||||
// swapInfo constructs and returns a filled SwapInfo from
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ func (h *HtlcScriptV2) SuccessSequence() uint32 {
|
|||
return 1
|
||||
}
|
||||
|
||||
// Sighash is the signature hash to use for transactions spending from the htlc.
|
||||
// SigHash is the signature hash to use for transactions spending from the htlc.
|
||||
func (h *HtlcScriptV2) SigHash() txscript.SigHashType {
|
||||
return txscript.SigHashAll
|
||||
}
|
||||
|
|
@ -785,7 +785,7 @@ func (h *HtlcScriptV3) SuccessSequence() uint32 {
|
|||
return 1
|
||||
}
|
||||
|
||||
// Sighash is the signature hash to use for transactions spending from the htlc.
|
||||
// SigHash is the signature hash to use for transactions spending from the htlc.
|
||||
func (h *HtlcScriptV3) SigHash() txscript.SigHashType {
|
||||
return txscript.SigHashDefault
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type PrefixLog struct {
|
|||
|
||||
// Infof formats message according to format specifier and writes to
|
||||
// log with LevelInfo.
|
||||
func (s *PrefixLog) Infof(format string, params ...interface{}) {
|
||||
func (s *PrefixLog) Infof(format string, params ...any) {
|
||||
s.Logger.Infof(
|
||||
fmt.Sprintf("%v %s", ShortHash(&s.Hash), format),
|
||||
params...,
|
||||
|
|
@ -27,7 +27,7 @@ func (s *PrefixLog) Infof(format string, params ...interface{}) {
|
|||
|
||||
// Warnf formats message according to format specifier and writes to log with
|
||||
// LevelError.
|
||||
func (s *PrefixLog) Warnf(format string, params ...interface{}) {
|
||||
func (s *PrefixLog) Warnf(format string, params ...any) {
|
||||
s.Logger.Warnf(
|
||||
fmt.Sprintf("%v %s", ShortHash(&s.Hash), format),
|
||||
params...,
|
||||
|
|
@ -36,7 +36,7 @@ func (s *PrefixLog) Warnf(format string, params ...interface{}) {
|
|||
|
||||
// Errorf formats message according to format specifier and writes to log with
|
||||
// LevelError.
|
||||
func (s *PrefixLog) Errorf(format string, params ...interface{}) {
|
||||
func (s *PrefixLog) Errorf(format string, params ...any) {
|
||||
s.Logger.Errorf(
|
||||
fmt.Sprintf("%v %s", ShortHash(&s.Hash), format),
|
||||
params...,
|
||||
|
|
|
|||
|
|
@ -574,10 +574,7 @@ func (s *grpcSwapServerClient) makeServerUpdate(ctx context.Context,
|
|||
updateChan := make(chan *ServerUpdate)
|
||||
|
||||
// Create a goroutine that will pipe updates in to our updates channel.
|
||||
s.wg.Add(1)
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
|
||||
s.wg.Go(func() {
|
||||
for {
|
||||
// Try to receive from our stream. If there are no items
|
||||
// to consume, this call will block. If our stream is
|
||||
|
|
@ -623,7 +620,7 @@ func (s *grpcSwapServerClient) makeServerUpdate(ctx context.Context,
|
|||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return updateChan, errChan
|
||||
}
|
||||
|
|
@ -658,7 +655,7 @@ type routeCancelMetadata struct {
|
|||
|
||||
// outCancelDetails contains the information required to cancel a loop out swap.
|
||||
type outCancelDetails struct {
|
||||
// Hash is the swap's hash.
|
||||
// hash is the swap's hash.
|
||||
hash lntypes.Hash
|
||||
|
||||
// paymentAddr is the payment address for the swap's invoice.
|
||||
|
|
|
|||
|
|
@ -273,10 +273,7 @@ func (e feeDetails) fee() btcutil.Amount {
|
|||
// combine returns new feeDetails, combining properties.
|
||||
func (e1 feeDetails) combine(e2 feeDetails) feeDetails {
|
||||
// The fee rate is max of two fee rates.
|
||||
feeRate := e1.FeeRate
|
||||
if feeRate < e2.FeeRate {
|
||||
feeRate = e2.FeeRate
|
||||
}
|
||||
feeRate := max(e1.FeeRate, e2.FeeRate)
|
||||
|
||||
return feeDetails{
|
||||
FeeRate: feeRate,
|
||||
|
|
|
|||
|
|
@ -37,16 +37,16 @@ func UseLogger(logger btclog.Logger) {
|
|||
}
|
||||
|
||||
// debugf logs a message with level DEBUG.
|
||||
func debugf(format string, params ...interface{}) {
|
||||
func debugf(format string, params ...any) {
|
||||
log().Debugf(format, params...)
|
||||
}
|
||||
|
||||
// infof logs a message with level INFO.
|
||||
func infof(format string, params ...interface{}) {
|
||||
func infof(format string, params ...any) {
|
||||
log().Infof(format, params...)
|
||||
}
|
||||
|
||||
// warnf logs a message with level WARN.
|
||||
func warnf(format string, params ...interface{}) {
|
||||
func warnf(format string, params ...any) {
|
||||
log().Warnf(format, params...)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,22 +465,22 @@ func (b *batch) setLog(logger btclog.Logger) {
|
|||
}
|
||||
|
||||
// Debugf logs a message with level DEBUG.
|
||||
func (b *batch) Debugf(format string, params ...interface{}) {
|
||||
func (b *batch) Debugf(format string, params ...any) {
|
||||
b.log().Debugf(format, params...)
|
||||
}
|
||||
|
||||
// Infof logs a message with level INFO.
|
||||
func (b *batch) Infof(format string, params ...interface{}) {
|
||||
func (b *batch) Infof(format string, params ...any) {
|
||||
b.log().Infof(format, params...)
|
||||
}
|
||||
|
||||
// Warnf logs a message with level WARN.
|
||||
func (b *batch) Warnf(format string, params ...interface{}) {
|
||||
func (b *batch) Warnf(format string, params ...any) {
|
||||
b.log().Warnf(format, params...)
|
||||
}
|
||||
|
||||
// Errorf logs a message with level ERROR.
|
||||
func (b *batch) Errorf(format string, params ...interface{}) {
|
||||
func (b *batch) Errorf(format string, params ...any) {
|
||||
b.log().Errorf(format, params...)
|
||||
}
|
||||
|
||||
|
|
@ -2034,10 +2034,8 @@ func (b *batch) monitorConfirmations(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
b.wg.Add(1)
|
||||
go func() {
|
||||
b.wg.Go(func() {
|
||||
defer cancel()
|
||||
defer b.wg.Done()
|
||||
|
||||
select {
|
||||
case conf := <-confChan:
|
||||
|
|
@ -2055,7 +2053,7 @@ func (b *batch) monitorConfirmations(ctx context.Context) error {
|
|||
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ type addSweepsRequest struct {
|
|||
// source.
|
||||
sweeps []*sweep
|
||||
|
||||
// Notifier is a notifier that is used to notify the requester of this
|
||||
// notifier is a notifier that is used to notify the requester of this
|
||||
// sweep that the sweep was successful.
|
||||
notifier *SpendNotifier
|
||||
|
||||
|
|
@ -1093,17 +1093,14 @@ func (b *Batcher) spinUpBatch(ctx context.Context, fast bool) (*batch, error) {
|
|||
// We add the batch to our map of batches and start it.
|
||||
b.batches[id] = batch
|
||||
|
||||
b.wg.Add(1)
|
||||
go func() {
|
||||
defer b.wg.Done()
|
||||
|
||||
b.wg.Go(func() {
|
||||
err := batch.Run(ctx)
|
||||
if err != nil {
|
||||
b.writeToErrChan(
|
||||
ctx, fmt.Errorf("new batch failed: %w", err),
|
||||
)
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return batch, nil
|
||||
}
|
||||
|
|
@ -1201,17 +1198,14 @@ func (b *Batcher) spinUpBatchFromDB(ctx context.Context, batch *batch) error {
|
|||
// We add the batch to our map of batches and start it.
|
||||
b.batches[batch.id] = newBatch
|
||||
|
||||
b.wg.Add(1)
|
||||
go func() {
|
||||
defer b.wg.Done()
|
||||
|
||||
b.wg.Go(func() {
|
||||
err := newBatch.Run(ctx)
|
||||
if err != nil {
|
||||
b.writeToErrChan(
|
||||
ctx, fmt.Errorf("db batch failed: %w", err),
|
||||
)
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1306,10 +1300,8 @@ func (b *Batcher) monitorSpendAndNotify(ctx context.Context, sweeps []*sweep,
|
|||
return err
|
||||
}
|
||||
|
||||
b.wg.Add(1)
|
||||
go func() {
|
||||
b.wg.Go(func() {
|
||||
defer cancel()
|
||||
defer b.wg.Done()
|
||||
infof("Batcher monitoring spend for swap %x",
|
||||
sweep.swapHash[:6])
|
||||
|
||||
|
|
@ -1395,7 +1387,7 @@ func (b *Batcher) monitorSpendAndNotify(ctx context.Context, sweeps []*sweep,
|
|||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1433,10 +1425,8 @@ func (b *Batcher) monitorConfAndNotify(ctx context.Context, sweep *sweep,
|
|||
return err
|
||||
}
|
||||
|
||||
b.wg.Add(1)
|
||||
go func() {
|
||||
b.wg.Go(func() {
|
||||
defer cancel()
|
||||
defer b.wg.Done()
|
||||
|
||||
select {
|
||||
case conf := <-confChan:
|
||||
|
|
@ -1472,7 +1462,7 @@ func (b *Batcher) monitorConfAndNotify(ctx context.Context, sweep *sweep,
|
|||
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"os"
|
||||
"sync"
|
||||
"testing"
|
||||
|
|
@ -166,10 +167,7 @@ func (b *batch) snapshot(ctx context.Context) *batch {
|
|||
var snapshot *batch
|
||||
b.testRunInEventLoop(ctx, func() {
|
||||
// Deep copy sweeps.
|
||||
sweeps := make(map[wire.OutPoint]sweep, len(b.sweeps))
|
||||
for o, s := range b.sweeps {
|
||||
sweeps[o] = s
|
||||
}
|
||||
sweeps := maps.Clone(b.sweeps)
|
||||
|
||||
// Deep copy cfg.
|
||||
cfg := *b.cfg
|
||||
|
|
@ -527,11 +525,9 @@ func testTxLabeler(t *testing.T, store testStore,
|
|||
wg sync.WaitGroup
|
||||
)
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Create a sweep request.
|
||||
op1 := wire.OutPoint{
|
||||
|
|
@ -609,11 +605,9 @@ func testTxLabeler(t *testing.T, store testStore,
|
|||
batcherStore, sweepStore, WithTxLabeler(txLabeler))
|
||||
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Expect batch to register for spending.
|
||||
<-lnd.RegisterSpendChannel
|
||||
|
|
@ -684,11 +678,9 @@ func testPublishErrorHandler(t *testing.T, store testStore,
|
|||
wg sync.WaitGroup
|
||||
)
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Create a sweep request.
|
||||
sweepReq1 := SweepRequest{
|
||||
|
|
@ -1195,12 +1187,10 @@ func testSweepBatcherSkippedTxns(t *testing.T, store testStore,
|
|||
batcherStore, sweepStore,
|
||||
)
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
||||
|
|
@ -1278,11 +1268,9 @@ func testSweepBatcherSkippedTxns(t *testing.T, store testStore,
|
|||
op1.Hash: {},
|
||||
}),
|
||||
)
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
||||
|
|
@ -1341,7 +1329,7 @@ type wrappedLogger struct {
|
|||
}
|
||||
|
||||
// Debugf logs debug message.
|
||||
func (l *wrappedLogger) Debugf(format string, params ...interface{}) {
|
||||
func (l *wrappedLogger) Debugf(format string, params ...any) {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
|
||||
|
|
@ -1350,7 +1338,7 @@ func (l *wrappedLogger) Debugf(format string, params ...interface{}) {
|
|||
}
|
||||
|
||||
// Infof logs info message.
|
||||
func (l *wrappedLogger) Infof(format string, params ...interface{}) {
|
||||
func (l *wrappedLogger) Infof(format string, params ...any) {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
|
||||
|
|
@ -1359,7 +1347,7 @@ func (l *wrappedLogger) Infof(format string, params ...interface{}) {
|
|||
}
|
||||
|
||||
// Warnf logs a warning message.
|
||||
func (l *wrappedLogger) Warnf(format string, params ...interface{}) {
|
||||
func (l *wrappedLogger) Warnf(format string, params ...any) {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
|
||||
|
|
@ -1402,13 +1390,11 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -1452,24 +1438,18 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
// so catch these actions from two separate goroutines.
|
||||
var wg2 sync.WaitGroup
|
||||
|
||||
wg2.Add(1)
|
||||
go func() {
|
||||
defer wg2.Done()
|
||||
|
||||
wg2.Go(func() {
|
||||
// Since a batch was created we check that it registered for its
|
||||
// primary sweep's spend.
|
||||
<-lnd.RegisterSpendChannel
|
||||
}()
|
||||
})
|
||||
|
||||
wg2.Add(1)
|
||||
var delays []time.Duration
|
||||
go func() {
|
||||
defer wg2.Done()
|
||||
|
||||
wg2.Go(func() {
|
||||
// Expect two timers: initialDelay and publishDelay.
|
||||
delays = append(delays, <-tickSignal)
|
||||
delays = append(delays, <-tickSignal)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for RegisterSpend and for timer registrations.
|
||||
wg2.Wait()
|
||||
|
|
@ -1560,11 +1540,9 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
WithPublishDelay(publishDelay), WithClock(testClock),
|
||||
)
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -1574,26 +1552,20 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
// these actions from two separate goroutines.
|
||||
var wg3 sync.WaitGroup
|
||||
|
||||
wg3.Add(1)
|
||||
go func() {
|
||||
defer wg3.Done()
|
||||
|
||||
wg3.Go(func() {
|
||||
// Since a batch was created we check that it registered for its
|
||||
// primary sweep's spend.
|
||||
<-lnd.RegisterSpendChannel
|
||||
|
||||
// Wait for tx to be published.
|
||||
<-lnd.TxPublishChannel
|
||||
}()
|
||||
})
|
||||
|
||||
wg3.Add(1)
|
||||
delays = nil
|
||||
go func() {
|
||||
defer wg3.Done()
|
||||
|
||||
wg3.Go(func() {
|
||||
// Expect one timer: publishDelay (0).
|
||||
delays = append(delays, <-tickSignal)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for RegisterSpend and for timer registration.
|
||||
wg3.Wait()
|
||||
|
|
@ -1667,11 +1639,9 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
WithPublishDelay(publishDelay), WithClock(testClock),
|
||||
)
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -1682,23 +1652,17 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
// these actions from two separate goroutines.
|
||||
var wg4 sync.WaitGroup
|
||||
|
||||
wg4.Add(1)
|
||||
go func() {
|
||||
defer wg4.Done()
|
||||
|
||||
wg4.Go(func() {
|
||||
// Since a batch was created we check that it registered for its
|
||||
// primary sweep's spend.
|
||||
<-lnd.RegisterSpendChannel
|
||||
}()
|
||||
})
|
||||
|
||||
wg4.Add(1)
|
||||
delays = nil
|
||||
go func() {
|
||||
defer wg4.Done()
|
||||
|
||||
wg4.Go(func() {
|
||||
// Expect one timer: publishDelay (0).
|
||||
delays = append(delays, <-tickSignal)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for RegisterSpend and for timer registration.
|
||||
wg4.Wait()
|
||||
|
|
@ -1754,24 +1718,18 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
|
|||
// parallel, so catch these actions from two separate goroutines.
|
||||
var wg5 sync.WaitGroup
|
||||
|
||||
wg5.Add(1)
|
||||
go func() {
|
||||
defer wg5.Done()
|
||||
|
||||
wg5.Go(func() {
|
||||
// Since a batch was created we check that it registered for its
|
||||
// primary sweep's spend.
|
||||
<-lnd.RegisterSpendChannel
|
||||
}()
|
||||
})
|
||||
|
||||
wg5.Add(1)
|
||||
delays = nil
|
||||
go func() {
|
||||
defer wg5.Done()
|
||||
|
||||
wg5.Go(func() {
|
||||
// Expect two timer: largeInitialDelay, publishDelay.
|
||||
delays = append(delays, <-tickSignal)
|
||||
delays = append(delays, <-tickSignal)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for RegisterSpend and for timers' registrations.
|
||||
wg5.Wait()
|
||||
|
|
@ -1920,13 +1878,11 @@ func testCustomDelays(t *testing.T, store testStore,
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -1968,24 +1924,18 @@ func testCustomDelays(t *testing.T, store testStore,
|
|||
// so catch these actions from two separate goroutines.
|
||||
var wg2 sync.WaitGroup
|
||||
|
||||
wg2.Add(1)
|
||||
go func() {
|
||||
defer wg2.Done()
|
||||
|
||||
wg2.Go(func() {
|
||||
// Since a batch was created we check that it registered for its
|
||||
// primary sweep's spend.
|
||||
<-lnd.RegisterSpendChannel
|
||||
}()
|
||||
})
|
||||
|
||||
wg2.Add(1)
|
||||
var delays []time.Duration
|
||||
go func() {
|
||||
defer wg2.Done()
|
||||
|
||||
wg2.Go(func() {
|
||||
// Expect two timers: initialDelay and publishDelay.
|
||||
delays = append(delays, <-tickSignal)
|
||||
delays = append(delays, <-tickSignal)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for RegisterSpend and for timer registrations.
|
||||
wg2.Wait()
|
||||
|
|
@ -2124,13 +2074,11 @@ func testMaxSweepsPerBatch(t *testing.T, store testStore,
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -2141,7 +2089,7 @@ func testMaxSweepsPerBatch(t *testing.T, store testStore,
|
|||
expectedBatches := (swapsNum + MaxSweepsPerBatch - 1) /
|
||||
MaxSweepsPerBatch
|
||||
|
||||
for i := 0; i < swapsNum; i++ {
|
||||
for i := range swapsNum {
|
||||
preimage := lntypes.Preimage{2, byte(i % 256), byte(i / 256)}
|
||||
swapHash := preimage.Hash()
|
||||
|
||||
|
|
@ -2212,14 +2160,14 @@ func testMaxSweepsPerBatch(t *testing.T, store testStore,
|
|||
|
||||
// Expect mockSigner.SignOutputRaw calls to sign non-cooperative
|
||||
// sweeps.
|
||||
for i := 0; i < expectedBatches; i++ {
|
||||
for range expectedBatches {
|
||||
<-lnd.SignOutputRawChannel
|
||||
}
|
||||
|
||||
// Wait for txs to be published.
|
||||
inputsNum := 0
|
||||
const maxWeight = lntypes.WeightUnit(400_000)
|
||||
for i := 0; i < expectedBatches; i++ {
|
||||
for range expectedBatches {
|
||||
tx := <-lnd.TxPublishChannel
|
||||
inputsNum += len(tx.TxIn)
|
||||
|
||||
|
|
@ -3226,13 +3174,11 @@ func testRestoringEmptyBatch(t *testing.T, store testStore,
|
|||
batcherStore, sweepStore)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -3407,13 +3353,11 @@ func testHandleSweepTwice(t *testing.T, backend testStore,
|
|||
batcherStore, sweepStore)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -3613,13 +3557,11 @@ func testRestoringPreservesConfTarget(t *testing.T, store testStore,
|
|||
batcherStore, sweepStore)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -3707,11 +3649,9 @@ func testRestoringPreservesConfTarget(t *testing.T, store testStore,
|
|||
testMuSig2SignSweep, testVerifySchnorrSig, lnd.ChainParams,
|
||||
batcherStore, sweepStore)
|
||||
ctx, cancel = context.WithCancel(context.Background())
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -3862,13 +3802,11 @@ func testSweepFetcher(t *testing.T, store testStore,
|
|||
WithCustomSignMuSig2(testSignMuSig2func))
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -3976,9 +3914,7 @@ func testSweepBatcherCloseDuringAdding(t *testing.T, store testStore,
|
|||
}
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
// Add many sweeps.
|
||||
for i := byte(1); i < 255; i++ {
|
||||
// Create a sweep request.
|
||||
|
|
@ -4007,15 +3943,13 @@ func testSweepBatcherCloseDuringAdding(t *testing.T, store testStore,
|
|||
}
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
// Close sweepbatcher during addings.
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
cancel()
|
||||
}()
|
||||
})
|
||||
|
||||
// We don't know how many spend notification registrations will be
|
||||
// issued, so accept them while waiting for two goroutines to stop.
|
||||
|
|
@ -4063,11 +3997,9 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore,
|
|||
|
||||
var wg sync.WaitGroup
|
||||
var runErr error
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
<-batcher.initDone
|
||||
|
||||
|
|
@ -4147,10 +4079,7 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore,
|
|||
confCtx, confCancel := context.WithCancel(ctx)
|
||||
defer confCancel()
|
||||
|
||||
addWG.Add(1)
|
||||
go func() {
|
||||
defer addWG.Done()
|
||||
|
||||
addWG.Go(func() {
|
||||
// After this goroutine completes, stop the goroutine that
|
||||
// handles registrations as well. Give it one second to finish
|
||||
// the last AddSweep to prevent goroutine leaks.
|
||||
|
|
@ -4170,7 +4099,7 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore,
|
|||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait a bit so the AddSweep loop runs and keeps handleSweep busy.
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
|
@ -4178,9 +4107,7 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore,
|
|||
// This goroutine handles spending and confirmation registrations.
|
||||
// One spending registration has been created above, so the loop starts
|
||||
// with the next step - notifying about spending.
|
||||
addWG.Add(1)
|
||||
go func() {
|
||||
defer addWG.Done()
|
||||
addWG.Go(func() {
|
||||
for {
|
||||
spendingTx := publishedTx
|
||||
spendingHash := spendingTx.TxHash()
|
||||
|
|
@ -4230,7 +4157,7 @@ func testSweepBatcherHandleSweepRace(t *testing.T, store testStore,
|
|||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
addWG.Wait()
|
||||
|
||||
|
|
@ -4596,12 +4523,10 @@ func TestSweepBatcherConfirmedBatchIncompleteSweeps(t *testing.T) {
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx1)
|
||||
}()
|
||||
})
|
||||
|
||||
<-batcher.initDone
|
||||
|
||||
|
|
@ -4661,13 +4586,11 @@ func testCustomSignMuSig2(t *testing.T, store testStore,
|
|||
sweepStore, WithCustomSignMuSig2(testSignMuSig2func))
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -4786,13 +4709,11 @@ func testWithMixedBatch(t *testing.T, store testStore,
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
@ -4969,13 +4890,11 @@ func testWithMixedBatchCustom(t *testing.T, store testStore,
|
|||
)
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
var runErr error
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
wg.Go(func() {
|
||||
runErr = batcher.Run(ctx)
|
||||
}()
|
||||
})
|
||||
|
||||
// Wait for the batcher to be initialized.
|
||||
<-batcher.initDone
|
||||
|
|
|
|||
|
|
@ -71,10 +71,7 @@ func (c *mockChainNotifier) RegisterSpendNtfn(ctx context.Context,
|
|||
spendChan := make(chan *chainntnfs.SpendDetail, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
||||
c.wg.Add(1)
|
||||
go func() {
|
||||
defer c.wg.Done()
|
||||
|
||||
c.wg.Go(func() {
|
||||
select {
|
||||
case m := <-c.lnd.SpendChannel:
|
||||
select {
|
||||
|
|
@ -96,7 +93,7 @@ func (c *mockChainNotifier) RegisterSpendNtfn(ctx context.Context,
|
|||
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
return spendChan, errChan, nil
|
||||
}
|
||||
|
|
@ -117,13 +114,11 @@ func (c *mockChainNotifier) RegisterBlockEpochNtfn(ctx context.Context) (
|
|||
)
|
||||
c.lnd.lock.Unlock()
|
||||
|
||||
c.wg.Add(1)
|
||||
go func() {
|
||||
defer c.wg.Done()
|
||||
c.wg.Go(func() {
|
||||
defer func() {
|
||||
c.lnd.lock.Lock()
|
||||
defer c.lnd.lock.Unlock()
|
||||
for i := 0; i < len(c.lnd.blockHeightListeners); i++ {
|
||||
for i := range len(c.lnd.blockHeightListeners) {
|
||||
if c.lnd.blockHeightListeners[i] == blockEpochChan {
|
||||
c.lnd.blockHeightListeners = append(
|
||||
c.lnd.blockHeightListeners[:i],
|
||||
|
|
@ -143,7 +138,7 @@ func (c *mockChainNotifier) RegisterBlockEpochNtfn(ctx context.Context) (
|
|||
c.lnd.lock.Unlock()
|
||||
|
||||
<-ctx.Done()
|
||||
}()
|
||||
})
|
||||
|
||||
return blockEpochChan, blockErrorChan, nil
|
||||
}
|
||||
|
|
@ -170,10 +165,7 @@ func (c *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,
|
|||
|
||||
errChan := make(chan error, 1)
|
||||
|
||||
c.wg.Add(1)
|
||||
go func() {
|
||||
defer c.wg.Done()
|
||||
|
||||
c.wg.Go(func() {
|
||||
select {
|
||||
case m := <-c.lnd.ConfChannel:
|
||||
c.Lock()
|
||||
|
|
@ -205,7 +197,7 @@ func (c *mockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context,
|
|||
|
||||
case <-ctx.Done():
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
select {
|
||||
case c.lnd.RegisterConfChannel <- reg:
|
||||
|
|
|
|||
|
|
@ -280,9 +280,7 @@ func (h *mockLightningClient) ListPayments(_ context.Context,
|
|||
}
|
||||
|
||||
lastIndexOffset := req.Offset + req.MaxPayments
|
||||
if lastIndexOffset > uint64(len(h.lnd.Payments)) {
|
||||
lastIndexOffset = uint64(len(h.lnd.Payments))
|
||||
}
|
||||
lastIndexOffset = min(lastIndexOffset, uint64(len(h.lnd.Payments)))
|
||||
|
||||
result := h.lnd.Payments[req.Offset:lastIndexOffset]
|
||||
|
||||
|
|
|
|||
141
tools/go.mod
141
tools/go.mod
|
|
@ -4,7 +4,7 @@ go 1.26
|
|||
|
||||
require (
|
||||
// Once golangci-lint v2.4.1 update it here.
|
||||
github.com/golangci/golangci-lint/v2 v2.4.1-0.20250818164121-838684c5bc0c
|
||||
github.com/golangci/golangci-lint/v2 v2.10.1
|
||||
github.com/rinchsan/gosimports v0.3.8
|
||||
)
|
||||
|
||||
|
|
@ -12,17 +12,17 @@ require (
|
|||
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
|
||||
4d63.com/gochecknoglobals v0.2.2 // indirect
|
||||
github.com/4meepo/tagalign v1.4.3 // indirect
|
||||
github.com/Abirdcfly/dupword v0.1.6 // indirect
|
||||
github.com/Antonboom/errname v1.1.0 // indirect; indirecttidy
|
||||
github.com/Antonboom/nilnil v1.1.0 // indirect
|
||||
github.com/Antonboom/testifylint v1.6.1 // indirect
|
||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.3.1 // indirect
|
||||
github.com/Abirdcfly/dupword v0.1.7 // indirect
|
||||
github.com/Antonboom/errname v1.1.1 // indirect; indirecttidy
|
||||
github.com/Antonboom/nilnil v1.1.1 // indirect
|
||||
github.com/Antonboom/testifylint v1.6.4 // indirect
|
||||
github.com/BurntSushi/toml v1.6.0 // indirect
|
||||
github.com/Djarvur/go-err113 v0.1.1 // indirect
|
||||
github.com/Masterminds/semver/v3 v3.4.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
|
||||
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
|
||||
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.2 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/alingse/nilnesserr v0.2.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
|
|
@ -33,10 +33,10 @@ require (
|
|||
github.com/breml/errchkjson v0.4.1 // indirect
|
||||
github.com/butuzov/ireturn v0.4.0 // indirect
|
||||
github.com/butuzov/mirror v1.3.0 // indirect
|
||||
github.com/catenacyber/perfsprint v0.9.1 // indirect
|
||||
github.com/catenacyber/perfsprint v0.10.1 // indirect
|
||||
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/charithe/durationcheck v0.0.10 // indirect
|
||||
github.com/charithe/durationcheck v0.0.11 // indirect
|
||||
github.com/ckaznocha/intrange v0.3.1 // indirect
|
||||
github.com/curioswitch/go-reassign v0.3.0 // indirect
|
||||
github.com/daixiang0/gci v0.13.7 // indirect
|
||||
|
|
@ -48,8 +48,8 @@ require (
|
|||
github.com/firefart/nonamedreturns v1.0.6 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.15 // indirect
|
||||
github.com/go-critic/go-critic v0.13.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.20 // indirect
|
||||
github.com/go-critic/go-critic v0.14.3 // indirect
|
||||
github.com/go-toolsmith/astcast v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.1.0 // indirect
|
||||
github.com/go-toolsmith/astequal v1.2.0 // indirect
|
||||
|
|
@ -57,26 +57,26 @@ require (
|
|||
github.com/go-toolsmith/astp v1.1.0 // indirect
|
||||
github.com/go-toolsmith/strparse v1.1.0 // indirect
|
||||
github.com/go-toolsmith/typep v1.1.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.12.1 // indirect
|
||||
github.com/gofrs/flock v0.13.0 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
|
||||
github.com/golangci/go-printf-func-name v0.1.0 // indirect
|
||||
github.com/golangci/go-printf-func-name v0.1.1 // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
|
||||
github.com/golangci/misspell v0.7.0 // indirect
|
||||
github.com/golangci/misspell v0.8.0 // indirect
|
||||
github.com/golangci/plugin-module-register v0.1.2 // indirect
|
||||
github.com/golangci/revgrep v0.8.0 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.1.0 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.2.0 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.5.0 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.2 // indirect
|
||||
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
|
||||
github.com/hashicorp/go-version v1.7.0 // indirect
|
||||
github.com/hashicorp/go-version v1.8.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
|
|
@ -85,45 +85,44 @@ require (
|
|||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jjti/go-spancheck v0.6.5 // indirect
|
||||
github.com/julz/importas v0.2.0 // indirect
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect
|
||||
github.com/kisielk/errcheck v1.9.0 // indirect
|
||||
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.14 // indirect
|
||||
github.com/kulti/thelper v0.7.1 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.15 // indirect
|
||||
github.com/lasiar/canonicalheader v1.1.2 // indirect
|
||||
github.com/ldez/exptostd v0.4.4 // indirect
|
||||
github.com/ldez/gomoddirectives v0.7.0 // indirect
|
||||
github.com/ldez/grignotin v0.10.0 // indirect
|
||||
github.com/ldez/tagliatelle v0.7.1 // indirect
|
||||
github.com/ldez/exptostd v0.4.5 // indirect
|
||||
github.com/ldez/gomoddirectives v0.8.0 // indirect
|
||||
github.com/ldez/grignotin v0.10.1 // indirect
|
||||
github.com/ldez/tagliatelle v0.7.2 // indirect
|
||||
github.com/ldez/usetesting v0.5.0 // indirect
|
||||
github.com/leonklingele/grouper v1.1.2 // indirect
|
||||
github.com/macabu/inamedparam v0.2.0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/maratori/testableexamples v1.0.0 // indirect
|
||||
github.com/maratori/testpackage v1.1.1 // indirect
|
||||
github.com/maratori/testableexamples v1.0.1 // indirect
|
||||
github.com/maratori/testpackage v1.1.2 // indirect
|
||||
github.com/matoous/godox v1.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mgechev/revive v1.11.0 // indirect
|
||||
github.com/mgechev/revive v1.14.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/moricho/tparallel v0.3.2 // indirect
|
||||
github.com/nakabonne/nestif v0.3.1 // indirect
|
||||
github.com/nishanths/exhaustive v0.12.0 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/nunnatsa/ginkgolinter v0.20.0 // indirect
|
||||
github.com/nunnatsa/ginkgolinter v0.23.0 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.4.4 // indirect
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.4.5 // indirect
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect
|
||||
github.com/quasilyte/gogrep v0.5.0 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
|
|
@ -136,26 +135,26 @@ require (
|
|||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
|
||||
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.22.8 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/securego/gosec/v2 v2.23.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.4 // indirect
|
||||
github.com/sivchari/containedctx v1.0.3 // indirect
|
||||
github.com/sonatard/noctx v0.4.0 // indirect
|
||||
github.com/sourcegraph/go-diff v0.7.0 // indirect
|
||||
github.com/spf13/afero v1.14.0 // indirect
|
||||
github.com/spf13/afero v1.15.0 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/cobra v1.9.1 // indirect
|
||||
github.com/spf13/cobra v1.10.2 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.7 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/stretchr/testify v1.10.0 // indirect
|
||||
github.com/stretchr/testify v1.11.1 // indirect
|
||||
github.com/subosito/gotenv v1.4.1 // indirect
|
||||
github.com/tetafro/godot v1.5.1 // indirect
|
||||
github.com/tetafro/godot v1.5.4 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect
|
||||
github.com/timonwong/loggercheck v0.11.0 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.11.0 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.12.0 // indirect
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
|
||||
github.com/ultraware/funlen v0.2.0 // indirect
|
||||
github.com/ultraware/whitespace v0.2.0 // indirect
|
||||
|
|
@ -168,50 +167,58 @@ require (
|
|||
gitlab.com/bosi/decorder v0.4.2 // indirect
|
||||
go-simpler.org/musttag v0.14.0 // indirect
|
||||
go-simpler.org/sloglint v0.11.1 // indirect
|
||||
go.uber.org/automaxprocs v1.6.0 // indirect
|
||||
go.uber.org/multierr v1.10.0 // indirect
|
||||
go.uber.org/zap v1.27.0 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect
|
||||
golang.org/x/mod v0.27.0 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
golang.org/x/tools v0.36.0 // indirect
|
||||
google.golang.org/protobuf v1.36.6 // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect
|
||||
golang.org/x/mod v0.33.0 // indirect
|
||||
golang.org/x/sync v0.19.0 // indirect
|
||||
golang.org/x/sys v0.41.0 // indirect
|
||||
golang.org/x/text v0.34.0 // indirect
|
||||
golang.org/x/tools v0.42.0 // indirect
|
||||
google.golang.org/protobuf v1.36.8 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
honnef.co/go/tools v0.6.1 // indirect
|
||||
mvdan.cc/gofumpt v0.8.0 // indirect
|
||||
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
|
||||
honnef.co/go/tools v0.7.0 // indirect
|
||||
mvdan.cc/gofumpt v0.9.2 // indirect
|
||||
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
codeberg.org/chavacava/garif v0.2.0 // indirect
|
||||
codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect
|
||||
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect
|
||||
dev.gaijin.team/go/golib v0.6.0 // indirect
|
||||
github.com/AdminBenni/iota-mixing v1.0.0 // indirect
|
||||
github.com/AlwxSin/noinlineerr v1.0.5 // indirect
|
||||
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
|
||||
github.com/MirrexOne/unqueryvet v1.5.3 // indirect
|
||||
github.com/alecthomas/chroma/v2 v2.23.1 // indirect
|
||||
github.com/alfatraining/structtag v1.0.0 // indirect
|
||||
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
|
||||
github.com/ashanbrown/makezero/v2 v2.0.1 // indirect
|
||||
github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect
|
||||
github.com/ashanbrown/makezero/v2 v2.1.0 // indirect
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||
github.com/bombsimon/wsl/v5 v5.1.1 // indirect
|
||||
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
|
||||
github.com/bombsimon/wsl/v5 v5.6.0 // indirect
|
||||
github.com/charmbracelet/colorprofile v0.4.2 // indirect
|
||||
github.com/charmbracelet/lipgloss v1.1.0 // indirect
|
||||
github.com/charmbracelet/x/ansi v0.8.0 // indirect
|
||||
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
|
||||
github.com/charmbracelet/x/term v0.2.1 // indirect
|
||||
github.com/charmbracelet/x/ansi v0.11.6 // indirect
|
||||
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
|
||||
github.com/charmbracelet/x/term v0.2.2 // indirect
|
||||
github.com/clipperhouse/displaywidth v0.9.0 // indirect
|
||||
github.com/clipperhouse/stringish v0.1.1 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.5.0 // indirect
|
||||
github.com/dave/dst v0.27.3 // indirect
|
||||
github.com/dlclark/regexp2 v1.11.5 // indirect
|
||||
github.com/godoc-lint/godoc-lint v0.11.2 // indirect
|
||||
github.com/golangci/asciicheck v0.5.0 // indirect
|
||||
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
|
||||
github.com/golangci/golines v0.15.0 // indirect
|
||||
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/ldez/structtags v0.6.1 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
||||
github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect
|
||||
github.com/manuelarte/funcorder v0.5.0 // indirect
|
||||
github.com/muesli/termenv v0.16.0 // indirect
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
||||
go.augendre.info/arangolint v0.2.0 // indirect
|
||||
go.augendre.info/fatcontext v0.8.1 // indirect
|
||||
go.augendre.info/arangolint v0.4.0 // indirect
|
||||
go.augendre.info/fatcontext v0.9.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
)
|
||||
|
|
|
|||
319
tools/go.sum
319
tools/go.sum
|
|
@ -36,6 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
|
|||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY=
|
||||
codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ=
|
||||
codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI=
|
||||
codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8=
|
||||
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y=
|
||||
dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI=
|
||||
dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo=
|
||||
|
|
@ -43,34 +45,38 @@ dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQ
|
|||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8=
|
||||
github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c=
|
||||
github.com/Abirdcfly/dupword v0.1.6 h1:qeL6u0442RPRe3mcaLcbaCi2/Y/hOcdtw6DE9odjz9c=
|
||||
github.com/Abirdcfly/dupword v0.1.6/go.mod h1:s+BFMuL/I4YSiFv29snqyjwzDp4b65W2Kvy+PKzZ6cw=
|
||||
github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ=
|
||||
github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4=
|
||||
github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo=
|
||||
github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY=
|
||||
github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY=
|
||||
github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc=
|
||||
github.com/Antonboom/errname v1.1.0 h1:A+ucvdpMwlo/myWrkHEUEBWc/xuXdud23S8tmTb/oAE=
|
||||
github.com/Antonboom/errname v1.1.0/go.mod h1:O1NMrzgUcVBGIfi3xlVuvX8Q/VP/73sseCaAppfjqZw=
|
||||
github.com/Antonboom/nilnil v1.1.0 h1:jGxJxjgYS3VUUtOTNk8Z1icwT5ESpLH/426fjmQG+ng=
|
||||
github.com/Antonboom/nilnil v1.1.0/go.mod h1:b7sAlogQjFa1wV8jUW3o4PMzDVFLbTux+xnQdvzdcIE=
|
||||
github.com/Antonboom/testifylint v1.6.1 h1:6ZSytkFWatT8mwZlmRCHkWz1gPi+q6UBSbieji2Gj/o=
|
||||
github.com/Antonboom/testifylint v1.6.1/go.mod h1:k+nEkathI2NFjKO6HvwmSrbzUcQ6FAnbZV+ZRrnXPLI=
|
||||
github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q=
|
||||
github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ=
|
||||
github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ=
|
||||
github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II=
|
||||
github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ=
|
||||
github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
|
||||
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
|
||||
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM=
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
|
||||
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
|
||||
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g=
|
||||
github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k=
|
||||
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
||||
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/MirrexOne/unqueryvet v1.5.3 h1:LpT3rsH+IY3cQddWF9bg4C7jsbASdGnrOSofY8IPEiw=
|
||||
github.com/MirrexOne/unqueryvet v1.5.3/go.mod h1:fs9Zq6eh1LRIhsDIsxf9PONVUjYdFHdtkHIgZdJnyPU=
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4=
|
||||
github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo=
|
||||
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
||||
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||
github.com/alecthomas/chroma/v2 v2.20.0 h1:sfIHpxPyR07/Oylvmcai3X/exDlE8+FA820NTz+9sGw=
|
||||
github.com/alecthomas/chroma/v2 v2.20.0/go.mod h1:e7tViK0xh/Nf4BYHl00ycY6rV7b8iXBksI9E359yNmA=
|
||||
github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY=
|
||||
github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o=
|
||||
github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU=
|
||||
github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E=
|
||||
github.com/alecthomas/repr v0.5.1 h1:E3G4t2QbHTSNpPKBgMTln5KLkZHLOcU7r37J4pXBuIg=
|
||||
github.com/alecthomas/repr v0.5.1/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
|
||||
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
|
|
@ -78,18 +84,18 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
|
|||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ=
|
||||
github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q=
|
||||
github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw=
|
||||
github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE=
|
||||
github.com/alexkohler/prealloc v1.0.2 h1:MPo8cIkGkZytq7WNH9UHv3DIX1mPz1RatPXnZb0zHWQ=
|
||||
github.com/alexkohler/prealloc v1.0.2/go.mod h1:fT39Jge3bQrfA7nPMDngUfvUbQGQeJyGQnR+913SCig=
|
||||
github.com/alfatraining/structtag v1.0.0 h1:2qmcUqNcCoyVJ0up879K614L9PazjBSFruTB0GOFjCc=
|
||||
github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus=
|
||||
github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw=
|
||||
github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I=
|
||||
github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w=
|
||||
github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg=
|
||||
github.com/ashanbrown/forbidigo/v2 v2.1.0 h1:NAxZrWqNUQiDz19FKScQ/xvwzmij6BiOw3S0+QUQ+Hs=
|
||||
github.com/ashanbrown/forbidigo/v2 v2.1.0/go.mod h1:0zZfdNAuZIL7rSComLGthgc/9/n2FqspBOH90xlCHdA=
|
||||
github.com/ashanbrown/makezero/v2 v2.0.1 h1:r8GtKetWOgoJ4sLyUx97UTwyt2dO7WkGFHizn/Lo8TY=
|
||||
github.com/ashanbrown/makezero/v2 v2.0.1/go.mod h1:kKU4IMxmYW1M4fiEHMb2vc5SFoPzXvgbMR9gIp5pjSw=
|
||||
github.com/ashanbrown/forbidigo/v2 v2.3.0 h1:OZZDOchCgsX5gvToVtEBoV2UWbFfI6RKQTir2UZzSxo=
|
||||
github.com/ashanbrown/forbidigo/v2 v2.3.0/go.mod h1:5p6VmsG5/1xx3E785W9fouMxIOkvY2rRV9nMdWadd6c=
|
||||
github.com/ashanbrown/makezero/v2 v2.1.0 h1:snuKYMbqosNokUKm+R6/+vOPs8yVAi46La7Ck6QYSaE=
|
||||
github.com/ashanbrown/makezero/v2 v2.1.0/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
|
|
@ -102,8 +108,8 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ
|
|||
github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k=
|
||||
github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ=
|
||||
github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg=
|
||||
github.com/bombsimon/wsl/v5 v5.1.1 h1:cQg5KJf9FlctAH4cpL9vLKnziYknoCMCdqXl0wjl72Q=
|
||||
github.com/bombsimon/wsl/v5 v5.1.1/go.mod h1:Gp8lD04z27wm3FANIUPZycXp+8huVsn0oxc+n4qfV9I=
|
||||
github.com/bombsimon/wsl/v5 v5.6.0 h1:4z+/sBqC5vUmSp1O0mS+czxwH9+LKXtCWtHH9rZGQL8=
|
||||
github.com/bombsimon/wsl/v5 v5.6.0/go.mod h1:Uqt2EfrMj2NV8UGoN1f1Y3m0NpUVCsUdrNCdet+8LvU=
|
||||
github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE=
|
||||
github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE=
|
||||
github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg=
|
||||
|
|
@ -112,8 +118,8 @@ github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E
|
|||
github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70=
|
||||
github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc=
|
||||
github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI=
|
||||
github.com/catenacyber/perfsprint v0.9.1 h1:5LlTp4RwTooQjJCvGEFV6XksZvWE7wCOUvjD2z0vls0=
|
||||
github.com/catenacyber/perfsprint v0.9.1/go.mod h1:q//VWC2fWbcdSLEY1R3l8n0zQCDPdE4IjZwyY1HMunM=
|
||||
github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ=
|
||||
github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc=
|
||||
github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc=
|
||||
github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
|
|
@ -121,24 +127,30 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
|
|||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4=
|
||||
github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ=
|
||||
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
|
||||
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
|
||||
github.com/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1DidBcABctk=
|
||||
github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4=
|
||||
github.com/charmbracelet/colorprofile v0.4.2 h1:BdSNuMjRbotnxHSfxy+PCSa4xAmz7szw70ktAtWRYrY=
|
||||
github.com/charmbracelet/colorprofile v0.4.2/go.mod h1:0rTi81QpwDElInthtrQ6Ni7cG0sDtwAd4C4le060fT8=
|
||||
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
|
||||
github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
|
||||
github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE=
|
||||
github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q=
|
||||
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
|
||||
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
|
||||
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
|
||||
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
|
||||
github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8=
|
||||
github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ=
|
||||
github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI=
|
||||
github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q=
|
||||
github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk=
|
||||
github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs=
|
||||
github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/clipperhouse/displaywidth v0.9.0 h1:Qb4KOhYwRiN3viMv1v/3cTBlz3AcAZX3+y9OLhMtAtA=
|
||||
github.com/clipperhouse/displaywidth v0.9.0/go.mod h1:aCAAqTlh4GIVkhQnJpbL0T/WfcrJXHcj8C0yjYcjOZA=
|
||||
github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
|
||||
github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
|
||||
github.com/clipperhouse/uax29/v2 v2.5.0 h1:x7T0T4eTHDONxFJsL94uKNKPHrclyFI0lm7+w94cO8U=
|
||||
github.com/clipperhouse/uax29/v2 v2.5.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs=
|
||||
|
|
@ -174,10 +186,10 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV
|
|||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
|
||||
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
|
||||
github.com/ghostiam/protogetter v0.3.15 h1:1KF5sXel0HE48zh1/vn0Loiw25A9ApyseLzQuif1mLY=
|
||||
github.com/ghostiam/protogetter v0.3.15/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
|
||||
github.com/go-critic/go-critic v0.13.0 h1:kJzM7wzltQasSUXtYyTl6UaPVySO6GkaR1thFnJ6afY=
|
||||
github.com/go-critic/go-critic v0.13.0/go.mod h1:M/YeuJ3vOCQDnP2SU+ZhjgRzwzcBW87JqLpMJLrZDLI=
|
||||
github.com/ghostiam/protogetter v0.3.20 h1:oW7OPFit2FxZOpmMRPP9FffU4uUpfeE/rEdE1f+MzD0=
|
||||
github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI=
|
||||
github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog=
|
||||
github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
|
|
@ -213,14 +225,16 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi
|
|||
github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ=
|
||||
github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus=
|
||||
github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig=
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY=
|
||||
github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
|
||||
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
|
||||
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
|
||||
github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E=
|
||||
github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0=
|
||||
github.com/godoc-lint/godoc-lint v0.11.2 h1:Bp0FkJWoSdNsBikdNgIcgtaoo+xz6I/Y9s5WSBQUeeM=
|
||||
github.com/godoc-lint/godoc-lint v0.11.2/go.mod h1:iVpGdL1JCikNH2gGeAn3Hh+AgN5Gx/I/cxV+91L41jo=
|
||||
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
|
||||
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
|
|
@ -255,16 +269,16 @@ github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4n
|
|||
github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ=
|
||||
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw=
|
||||
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E=
|
||||
github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU=
|
||||
github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s=
|
||||
github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U=
|
||||
github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss=
|
||||
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE=
|
||||
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY=
|
||||
github.com/golangci/golangci-lint/v2 v2.4.1-0.20250818164121-838684c5bc0c h1:1RFhewLhOV3AWgBOlLhjozyh+Q+AcYBmb4UOst1m7DI=
|
||||
github.com/golangci/golangci-lint/v2 v2.4.1-0.20250818164121-838684c5bc0c/go.mod h1:UrZZ+4nTVngTvsTHDgyQjTKhtTrvGlnVg9V0Q4vC1JM=
|
||||
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 h1:AkK+w9FZBXlU/xUmBtSJN1+tAI4FIvy5WtnUnY8e4p8=
|
||||
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95/go.mod h1:k9mmcyWKSTMcPPvQUCfRWWQ9VHJ1U9Dc0R7kaXAgtnQ=
|
||||
github.com/golangci/misspell v0.7.0 h1:4GOHr/T1lTW0hhR4tgaaV1WS/lJ+ncvYCoFKmqJsj0c=
|
||||
github.com/golangci/misspell v0.7.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg=
|
||||
github.com/golangci/golangci-lint/v2 v2.10.1 h1:flhw5Px6ojbLyEFzXvJn5B2HEdkkRlkhE1SnmCbQBiE=
|
||||
github.com/golangci/golangci-lint/v2 v2.10.1/go.mod h1:dBsrOk6zj0vDhlTv+IiJGqkDokR24IVTS7W3EVfPTQY=
|
||||
github.com/golangci/golines v0.15.0 h1:Qnph25g8Y1c5fdo1X7GaRDGgnMHgnxh4Gk4VfPTtRx0=
|
||||
github.com/golangci/golines v0.15.0/go.mod h1:AZjXd23tbHMpowhtnGlj9KCNsysj72aeZVVHnVcZx10=
|
||||
github.com/golangci/misspell v0.8.0 h1:qvxQhiE2/5z+BVRo1kwYA8yGz+lOlu5Jfvtx2b04Jbg=
|
||||
github.com/golangci/misspell v0.8.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg=
|
||||
github.com/golangci/plugin-module-register v0.1.2 h1:e5WM6PO6NIAEcij3B053CohVp3HIYbzSuP53UAYgOpg=
|
||||
github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw=
|
||||
github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s=
|
||||
|
|
@ -298,23 +312,22 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
|||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a h1://KbezygeMJZCSHH+HgUZiTeSoiuFspbMg1ge+eFj18=
|
||||
github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA=
|
||||
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc=
|
||||
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s=
|
||||
github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0=
|
||||
github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs=
|
||||
github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw=
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk=
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc=
|
||||
github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado=
|
||||
github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM=
|
||||
github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8=
|
||||
github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc=
|
||||
github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk=
|
||||
github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY=
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk=
|
||||
github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A=
|
||||
github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU=
|
||||
github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA=
|
||||
github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M=
|
||||
github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8=
|
||||
github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs=
|
||||
|
|
@ -323,8 +336,8 @@ github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1T
|
|||
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
|
||||
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4=
|
||||
github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
|
|
@ -353,8 +366,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
|
|||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ=
|
||||
github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.1 h1:wmZaZYIjnJ0b5UoKDjUHrikcV0zuPyyxI4SVplLd2CI=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.1/go.mod h1:nFmMlFNlClC2BPvNaHMdkirmTJxVCY0lhxBtlfOypMM=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0=
|
||||
github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY=
|
||||
github.com/kisielk/errcheck v1.9.0 h1:9xt1zI9EBfcYBvdU1nVrzMzzUPUtPKs9bVSIM3TAb3M=
|
||||
github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
|
|
@ -370,26 +383,28 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs=
|
||||
github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I=
|
||||
github.com/kunwardeep/paralleltest v1.0.14 h1:wAkMoMeGX/kGfhQBPODT/BL8XhK23ol/nuQ3SwFaUw8=
|
||||
github.com/kunwardeep/paralleltest v1.0.14/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk=
|
||||
github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98=
|
||||
github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs=
|
||||
github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w=
|
||||
github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk=
|
||||
github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4=
|
||||
github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI=
|
||||
github.com/ldez/exptostd v0.4.4 h1:58AtQjnLcT/tI5W/1KU7xE/O7zW9RAWB6c/ScQAnfus=
|
||||
github.com/ldez/exptostd v0.4.4/go.mod h1:QfdzPw6oHjFVdNV7ILoPu5sw3OZ3OG1JS0I5JN3J4Js=
|
||||
github.com/ldez/gomoddirectives v0.7.0 h1:EOx8Dd56BZYSez11LVgdj025lKwlP0/E5OLSl9HDwsY=
|
||||
github.com/ldez/gomoddirectives v0.7.0/go.mod h1:wR4v8MN9J8kcwvrkzrx6sC9xe9Cp68gWYCsda5xvyGc=
|
||||
github.com/ldez/grignotin v0.10.0 h1:NQPeh1E/Eza4F0exCeC1WkpnLvgUcQDT8MQ1vOLML0E=
|
||||
github.com/ldez/grignotin v0.10.0/go.mod h1:oR4iCKUP9fwoeO6vCQeD7M5SMxCT6xdVas4vg0h1LaI=
|
||||
github.com/ldez/tagliatelle v0.7.1 h1:bTgKjjc2sQcsgPiT902+aadvMjCeMHrY7ly2XKFORIk=
|
||||
github.com/ldez/tagliatelle v0.7.1/go.mod h1:3zjxUpsNB2aEZScWiZTHrAXOl1x25t3cRmzfK1mlo2I=
|
||||
github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ=
|
||||
github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM=
|
||||
github.com/ldez/gomoddirectives v0.8.0 h1:JqIuTtgvFC2RdH1s357vrE23WJF2cpDCPFgA/TWDGpk=
|
||||
github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q=
|
||||
github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o=
|
||||
github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas=
|
||||
github.com/ldez/structtags v0.6.1 h1:bUooFLbXx41tW8SvkfwfFkkjPYvFFs59AAMgVg6DUBk=
|
||||
github.com/ldez/structtags v0.6.1/go.mod h1:YDxVSgDy/MON6ariaxLF2X09bh19qL7MtGBN5MrvbdY=
|
||||
github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk=
|
||||
github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI=
|
||||
github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc=
|
||||
github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ=
|
||||
github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY=
|
||||
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE=
|
||||
github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
|
|
@ -398,10 +413,10 @@ github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLt
|
|||
github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM=
|
||||
github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8=
|
||||
github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA=
|
||||
github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI=
|
||||
github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE=
|
||||
github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04=
|
||||
github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc=
|
||||
github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8=
|
||||
github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ=
|
||||
github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs=
|
||||
github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc=
|
||||
github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4=
|
||||
github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
|
|
@ -410,12 +425,12 @@ github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHP
|
|||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
||||
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mgechev/revive v1.11.0 h1:b/gLLpBE427o+Xmd8G58gSA+KtBwxWinH/A565Awh0w=
|
||||
github.com/mgechev/revive v1.11.0/go.mod h1:tI0oLF/2uj+InHCBLrrqfTKfjtFTBCFFfG05auyzgdw=
|
||||
github.com/mgechev/revive v1.14.0 h1:CC2Ulb3kV7JFYt+izwORoS3VT/+Plb8BvslI/l1yZsc=
|
||||
github.com/mgechev/revive v1.14.0/go.mod h1:MvnujelCZBZCaoDv5B3foPo6WWgULSSFxvfxp7GsPfo=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
|
|
@ -437,12 +452,12 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK
|
|||
github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs=
|
||||
github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk=
|
||||
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
|
||||
github.com/nunnatsa/ginkgolinter v0.20.0 h1:OmWLkAFO2HUTYcU6mprnKud1Ey5pVdiVNYGO5HVicx8=
|
||||
github.com/nunnatsa/ginkgolinter v0.20.0/go.mod h1:dCIuFlTPfQerXgGUju3VygfAFPdC5aE1mdacCDKDJcQ=
|
||||
github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
|
||||
github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
|
||||
github.com/onsi/gomega v1.38.0 h1:c/WX+w8SLAinvuKKQFh77WEucCnPk4j2OTUr7lt7BeY=
|
||||
github.com/onsi/gomega v1.38.0/go.mod h1:OcXcwId0b9QsE7Y49u+BTrL4IdKOBOKnD6VQNTJEB6o=
|
||||
github.com/nunnatsa/ginkgolinter v0.23.0 h1:x3o4DGYOWbBMP/VdNQKgSj+25aJKx2Pe6lHr8gBcgf8=
|
||||
github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4=
|
||||
github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI=
|
||||
github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE=
|
||||
github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28=
|
||||
github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg=
|
||||
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
|
||||
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
|
||||
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
|
||||
|
|
@ -459,10 +474,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
|||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/polyfloyd/go-errorlint v1.8.0 h1:DL4RestQqRLr8U4LygLw8g2DX6RN1eBJOpa2mzsrl1Q=
|
||||
github.com/polyfloyd/go-errorlint v1.8.0/go.mod h1:G2W0Q5roxbLCt0ZQbdoxQxXktTjwNyDbEaj3n7jvl4s=
|
||||
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
|
||||
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||
|
|
@ -486,10 +497,10 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
|||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
|
||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/quasilyte/go-ruleguard v0.4.4 h1:53DncefIeLX3qEpjzlS1lyUmQoUEeOWPFWqaTJq9eAQ=
|
||||
github.com/quasilyte/go-ruleguard v0.4.4/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE=
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE=
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=
|
||||
github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA=
|
||||
github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE=
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY=
|
||||
github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=
|
||||
github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo=
|
||||
github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng=
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU=
|
||||
|
|
@ -500,7 +511,6 @@ github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74
|
|||
github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU=
|
||||
github.com/rinchsan/gosimports v0.3.8 h1:X4Pb9yFf6teHvogorT04yK/0W2Df7eHO79biCcYrA4c=
|
||||
github.com/rinchsan/gosimports v0.3.8/go.mod h1:t0567k69sUHjLvJMPDsV31THZC+8UIbY1oL7NW+0I2c=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
|
|
@ -519,8 +529,8 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM
|
|||
github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ=
|
||||
github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ=
|
||||
github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8=
|
||||
github.com/securego/gosec/v2 v2.22.8 h1:3NMpmfXO8wAVFZPNsd3EscOTa32Jyo6FLLlW53bexMI=
|
||||
github.com/securego/gosec/v2 v2.22.8/go.mod h1:ZAw8K2ikuH9qDlfdV87JmNghnVfKB1XC7+TVzk6Utto=
|
||||
github.com/securego/gosec/v2 v2.23.0 h1:h4TtF64qFzvnkqvsHC/knT7YC5fqyOCItlVR8+ptEBo=
|
||||
github.com/securego/gosec/v2 v2.23.0/go.mod h1:qRHEgXLFuYUDkI2T7W7NJAmOkxVhkR0x9xyHOIcMNZ0=
|
||||
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
|
||||
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
|
|
@ -528,32 +538,32 @@ github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOms
|
|||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
|
||||
github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
|
||||
github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE=
|
||||
github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4=
|
||||
github.com/sonatard/noctx v0.4.0 h1:7MC/5Gg4SQ4lhLYR6mvOP6mQVSxCrdyiExo7atBs27o=
|
||||
github.com/sonatard/noctx v0.4.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas=
|
||||
github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0=
|
||||
github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
|
||||
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
|
||||
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
|
||||
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
|
||||
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
|
||||
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
|
||||
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
|
||||
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
|
||||
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
|
||||
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0=
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
|
||||
github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4=
|
||||
github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+E80QIyPnBVQbYZyv20Jfk=
|
||||
github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g=
|
||||
github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
|
|
@ -561,23 +571,22 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/
|
|||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs=
|
||||
github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
|
||||
github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA=
|
||||
github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0=
|
||||
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag=
|
||||
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY=
|
||||
github.com/tetafro/godot v1.5.1 h1:PZnjCol4+FqaEzvZg5+O8IY2P3hfY9JzRBNPv1pEDS4=
|
||||
github.com/tetafro/godot v1.5.1/go.mod h1:cCdPtEndkmqqrhiCfkmxDodMQJ/f3L1BCNskCUZdTwk=
|
||||
github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg=
|
||||
github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU=
|
||||
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk=
|
||||
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460=
|
||||
github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M=
|
||||
github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8=
|
||||
github.com/tomarrell/wrapcheck/v2 v2.11.0 h1:BJSt36snX9+4WTIXeJ7nvHBQBcm1h2SjQMSlmQ6aFSU=
|
||||
github.com/tomarrell/wrapcheck/v2 v2.11.0/go.mod h1:wFL9pDWDAbXhhPZZt+nG8Fu+h29TtnZ2MW6Lx4BRXIU=
|
||||
github.com/tomarrell/wrapcheck/v2 v2.12.0 h1:H/qQ1aNWz/eeIhxKAFvkfIA+N7YDvq6TWVFL27Of9is=
|
||||
github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo=
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw=
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw=
|
||||
github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI=
|
||||
|
|
@ -613,23 +622,23 @@ go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo=
|
|||
go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE=
|
||||
go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s=
|
||||
go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ=
|
||||
go.augendre.info/arangolint v0.2.0 h1:2NP/XudpPmfBhQKX4rMk+zDYIj//qbt4hfZmSSTcpj8=
|
||||
go.augendre.info/arangolint v0.2.0/go.mod h1:Vx4KSJwu48tkE+8uxuf0cbBnAPgnt8O1KWiT7bljq7w=
|
||||
go.augendre.info/fatcontext v0.8.1 h1:/T4+cCjpL9g71gJpcFAgVo/K5VFpqlN+NPU7QXxD5+A=
|
||||
go.augendre.info/fatcontext v0.8.1/go.mod h1:r3Qz4ZOzex66wfyyj5VZ1xUcl81vzvHQ6/GWzzlMEwA=
|
||||
go.augendre.info/arangolint v0.4.0 h1:xSCZjRoS93nXazBSg5d0OGCi9APPLNMmmLrC995tR50=
|
||||
go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xqst/xOvAA=
|
||||
go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE=
|
||||
go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
|
||||
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
|
||||
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
|
@ -649,12 +658,12 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
|
|||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
|
||||
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
|
||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
|
||||
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
|
||||
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
||||
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
||||
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b h1:KdrhdYPDUvJTvrDK9gdjfFd6JTk8vA1WJoldYSi0kHo=
|
||||
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b/go.mod h1:LKZHyeOpPuZcMgxeHjJp4p5yvxrCX1xDvH10zYHhjjQ=
|
||||
golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjOvhEOkmyGPVoquqUKnIU0lEVLp8xyk=
|
||||
golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
|
|
@ -682,8 +691,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
|
|||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
|
||||
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
|
||||
golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8=
|
||||
golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
|
|
@ -722,8 +731,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
|||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60=
|
||||
golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
|
@ -745,8 +754,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
|
|
@ -791,15 +800,14 @@ golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
|
||||
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
|
|
@ -816,8 +824,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk=
|
||||
golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
|
@ -853,7 +861,6 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK
|
|||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
|
|
@ -863,20 +870,17 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
|
|||
golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU=
|
||||
golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
|
||||
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
|
||||
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
|
||||
golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k=
|
||||
golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM=
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY=
|
||||
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM=
|
||||
|
|
@ -960,8 +964,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
|
||||
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
@ -978,7 +982,6 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
|
@ -988,12 +991,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI=
|
||||
honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4=
|
||||
mvdan.cc/gofumpt v0.8.0 h1:nZUCeC2ViFaerTcYKstMmfysj6uhQrA2vJe+2vwGU6k=
|
||||
mvdan.cc/gofumpt v0.8.0/go.mod h1:vEYnSzyGPmjvFkqJWtXkh79UwPWP9/HMxQdGEXZHjpg=
|
||||
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 h1:WjUu4yQoT5BHT1w8Zu56SP8367OuBV5jvo+4Ulppyf8=
|
||||
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4/go.mod h1:rthT7OuvRbaGcd5ginj6dA2oLE7YNlta9qhBNNdCaLE=
|
||||
honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU=
|
||||
honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc=
|
||||
mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4=
|
||||
mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s=
|
||||
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI=
|
||||
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
|
|
|||
8
utils.go
8
utils.go
|
|
@ -368,9 +368,9 @@ func sufficientHints(numHints, maxHints, scalingFactor int, amount,
|
|||
return false
|
||||
}
|
||||
|
||||
// SelectHopHints will select up to numMaxHophints from the set of passed open
|
||||
// channels. The set of hop hints will be returned as a slice of functional
|
||||
// options that'll append the route hint to the set of all route hints.
|
||||
// invoicesrpcSelectHopHints will select up to numMaxHophints from the set of
|
||||
// passed open channels. The set of hop hints will be returned as a slice of
|
||||
// functional options that'll append the route hint to the set of all hints.
|
||||
//
|
||||
// TODO(sputn1ck): remove when https://github.com/lightningnetwork/lnd/pull/7065
|
||||
// is merged to a new lnd release.
|
||||
|
|
@ -438,7 +438,7 @@ func invoicesrpcSelectHopHints(amtMSat lnwire.MilliSatoshi, cfg *SelectHopHintsC
|
|||
// or if the sum of available bandwidth in the routing hints exceeds 2x
|
||||
// the payment amount. We do 2x here to account for a margin of error
|
||||
// if some of the selected channels no longer become operable.
|
||||
for i := 0; i < len(openChannels); i++ {
|
||||
for i := range len(openChannels) {
|
||||
enoughHopHints := sufficientHints(
|
||||
len(hopHints), numMaxHophints, hopHintFactor, amtMSat,
|
||||
totalHintBandwidth,
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ func MuSig2Sign(version input.MuSig2Version, privKeys []*btcec.PrivateKey,
|
|||
|
||||
// Next we'll pass around all public nonces to all MuSig2 sessions so
|
||||
// that they become usable for creating the partial signatures.
|
||||
for i := 0; i < len(privKeys); i++ {
|
||||
for i := range len(privKeys) {
|
||||
nonce := sessions[i].PublicNonce()
|
||||
|
||||
for j := 0; j < len(privKeys); j++ {
|
||||
for j := range len(privKeys) {
|
||||
if i == j {
|
||||
// Step over if it's the same session.
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue