[lbry] ci: fixed various lint errors
This commit is contained in:
parent
bf7a513006
commit
3cb961257c
12 changed files with 24 additions and 22 deletions
|
@ -172,7 +172,8 @@ func (b *BlockChain) findPreviousCheckpoint() (*blockNode, error) {
|
||||||
func isNonstandardTransaction(tx *btcutil.Tx) bool {
|
func isNonstandardTransaction(tx *btcutil.Tx) bool {
|
||||||
// Check all of the output public key scripts for non-standard scripts.
|
// Check all of the output public key scripts for non-standard scripts.
|
||||||
for _, txOut := range tx.MsgTx().TxOut {
|
for _, txOut := range tx.MsgTx().TxOut {
|
||||||
scriptClass := txscript.GetScriptClass(txOut.PkScript)
|
stripped := txscript.StripClaimScriptPrefix(txOut.PkScript)
|
||||||
|
scriptClass := txscript.GetScriptClass(stripped)
|
||||||
if scriptClass == txscript.NonStandardTy {
|
if scriptClass == txscript.NonStandardTy {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,10 +224,7 @@ func withinLevelBounds(reduction int64, lv int64) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
reduction++
|
reduction++
|
||||||
if ((reduction*reduction + reduction) >> 1) <= lv {
|
return ((reduction*reduction + reduction) >> 1) > lv
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckTransactionSanity performs some preliminary checks on a transaction to
|
// CheckTransactionSanity performs some preliminary checks on a transaction to
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// This file is ignored during the regular build due to the following build tag.
|
// This file is ignored during the regular build due to the following build tag.
|
||||||
// It is called by go generate and used to automatically generate pre-computed
|
// It is called by go generate and used to automatically generate pre-computed
|
||||||
// tables used to accelerate operations.
|
// tables used to accelerate operations.
|
||||||
|
//go:build ignore
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
// This file is ignored during the regular build due to the following build tag.
|
// This file is ignored during the regular build due to the following build tag.
|
||||||
// This build tag is set during go generate.
|
// This build tag is set during go generate.
|
||||||
|
//go:build gensecp256k1
|
||||||
// +build gensecp256k1
|
// +build gensecp256k1
|
||||||
|
|
||||||
package btcec
|
package btcec
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run -tags gensecp256k1 genprecomps.go
|
//go:rm -f gensecp256k1.go; generate go run -tags gensecp256k1 genprecomps.go
|
||||||
|
|
||||||
// loadS256BytePoints decompresses and deserializes the pre-computed byte points
|
// loadS256BytePoints decompresses and deserializes the pre-computed byte points
|
||||||
// used to accelerate scalar base multiplication for the secp256k1 curve. This
|
// used to accelerate scalar base multiplication for the secp256k1 curve. This
|
||||||
|
|
|
@ -14,18 +14,18 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/comparer"
|
|
||||||
ldberrors "github.com/btcsuite/goleveldb/leveldb/errors"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/filter"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/iterator"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/opt"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
|
||||||
"github.com/lbryio/lbcd/chaincfg/chainhash"
|
"github.com/lbryio/lbcd/chaincfg/chainhash"
|
||||||
"github.com/lbryio/lbcd/database"
|
"github.com/lbryio/lbcd/database"
|
||||||
"github.com/lbryio/lbcd/database/internal/treap"
|
"github.com/lbryio/lbcd/database/internal/treap"
|
||||||
"github.com/lbryio/lbcd/wire"
|
"github.com/lbryio/lbcd/wire"
|
||||||
btcutil "github.com/lbryio/lbcutil"
|
btcutil "github.com/lbryio/lbcutil"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/comparer"
|
||||||
|
ldberrors "github.com/syndtr/goleveldb/leveldb/errors"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/filter"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/iterator"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/opt"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -10,10 +10,10 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/iterator"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
|
||||||
"github.com/lbryio/lbcd/database/internal/treap"
|
"github.com/lbryio/lbcd/database/internal/treap"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/iterator"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
package ffldb
|
package ffldb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/btcsuite/goleveldb/leveldb/iterator"
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
|
||||||
"github.com/lbryio/lbcd/database/internal/treap"
|
"github.com/lbryio/lbcd/database/internal/treap"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/iterator"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ldbTreapIter wraps a treap iterator to provide the additional functionality
|
// ldbTreapIter wraps a treap iterator to provide the additional functionality
|
||||||
|
|
|
@ -17,11 +17,11 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/btcsuite/goleveldb/leveldb"
|
|
||||||
ldberrors "github.com/btcsuite/goleveldb/leveldb/errors"
|
|
||||||
"github.com/lbryio/lbcd/database"
|
"github.com/lbryio/lbcd/database"
|
||||||
"github.com/lbryio/lbcd/wire"
|
"github.com/lbryio/lbcd/wire"
|
||||||
btcutil "github.com/lbryio/lbcutil"
|
btcutil "github.com/lbryio/lbcutil"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
|
ldberrors "github.com/syndtr/goleveldb/leveldb/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build !windows && !plan9
|
||||||
// +build !windows,!plan9
|
// +build !windows,!plan9
|
||||||
|
|
||||||
package limits
|
package limits
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
|
||||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
4
upnp.go
4
upnp.go
|
@ -136,7 +136,7 @@ func Discover() (nat NAT, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = errors.New("UPnP port discovery failed")
|
err = errors.New("UPnP port discovery failed")
|
||||||
return
|
return nat, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// service represents the Service type in an UPnP xml description.
|
// service represents the Service type in an UPnP xml description.
|
||||||
|
@ -269,7 +269,7 @@ func getServiceURL(rootURL string) (url string, err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
url = combineURL(rootURL, d.ControlURL)
|
url = combineURL(rootURL, d.ControlURL)
|
||||||
return
|
return url, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// combineURL appends subURL onto rootURL.
|
// combineURL appends subURL onto rootURL.
|
||||||
|
|
Loading…
Reference in a new issue