mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
multi: update linter, fix issues
This commit is contained in:
parent
bac1416636
commit
08026dab93
25 changed files with 525 additions and 346 deletions
|
|
@ -10,6 +10,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/coreos/bbolt"
|
||||
proxy "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
|
|
@ -302,7 +303,10 @@ func (d *Daemon) startWebServers() error {
|
|||
if d.restListener != nil {
|
||||
log.Infof("Starting REST proxy listener")
|
||||
|
||||
d.restServer = &http.Server{Handler: restHandler}
|
||||
d.restServer = &http.Server{
|
||||
Handler: restHandler,
|
||||
ReadHeaderTimeout: 5 * time.Second,
|
||||
}
|
||||
|
||||
d.wg.Add(1)
|
||||
go func() {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func migrateBoltdb(ctx context.Context, cfg *Config) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// If the migration was successfull we'll rename the bolt db to
|
||||
// If the migration was successful we'll rename the bolt db to
|
||||
// loop.db.bk.
|
||||
err = os.Rename(
|
||||
filepath.Join(cfg.DataDir, "loop.db"),
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ func viewOut(swapClient *loop.Client, chainParams *chaincfg.Params) error {
|
|||
}
|
||||
|
||||
for _, s := range swaps {
|
||||
s := s
|
||||
|
||||
htlc, err := loop.GetHtlc(
|
||||
s.Hash, &s.Contract.SwapContract, chainParams,
|
||||
)
|
||||
|
|
@ -98,6 +100,8 @@ func viewIn(swapClient *loop.Client, chainParams *chaincfg.Params) error {
|
|||
}
|
||||
|
||||
for _, s := range swaps {
|
||||
s := s
|
||||
|
||||
htlc, err := loop.GetHtlc(
|
||||
s.Hash, &s.Contract.SwapContract, chainParams,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue