Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion accounts/keystore/passphrase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestKeyEncryptDecrypt(t *testing.T) {
t.Errorf("test %d: key address mismatch: have %x, want %x", i, key.Address, address)
}
// Recrypt with a new password and start over
password += "new data appended" // nolint: gosec
password += "new data appended" //nolint:gosec
if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil {
t.Errorf("test %d: failed to re-encrypt key %v", i, err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/diskusage.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func getFreeDiskSpace(path string) (uint64, error) {

// Available blocks * size per block = available space in bytes
var bavail = stat.Bavail
// nolint:staticcheck
//nolint:staticcheck
if stat.Bavail < 0 {
// FreeBSD can have a negative number of blocks available
// because of the grace limit.
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (it *insertIterator) next() (*types.Block, error) {
//
// Both header and body validation errors (nil too) is cached into the iterator
// to avoid duplicating work on the following next() call.
// nolint:unused
//nolint:unused
func (it *insertIterator) peek() (*types.Block, error) {
// If we reached the end of the chain, abort
if it.index+1 >= len(it.chain) {
Expand Down
2 changes: 1 addition & 1 deletion core/genesis_alloc.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions core/txpool/locals/tx_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ func (env *testEnv) close() {
env.chain.Stop()
}

// nolint:unused
//nolint:unused
func (env *testEnv) setGasTip(gasTip uint64) {
env.pool.SetGasTip(new(big.Int).SetUint64(gasTip))
}

// nolint:unused
//nolint:unused
func (env *testEnv) makeTx(nonce uint64, gasPrice *big.Int) *types.Transaction {
if nonce == 0 {
head := env.chain.CurrentHeader()
Expand All @@ -125,7 +125,7 @@ func (env *testEnv) makeTxs(n int) []*types.Transaction {
return txs
}

// nolint:unused
//nolint:unused
func (env *testEnv) commit() {
head := env.chain.CurrentBlock()
block := env.chain.GetBlock(head.Hash(), head.Number.Uint64())
Expand Down
2 changes: 1 addition & 1 deletion crypto/blake2b/blake2b_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var precomputed = [10][16]byte{
{10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0},
}

// nolint:unused
//nolint:unused
func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
var m [16]uint64
c0, c1 := c[0], c[1]
Expand Down
2 changes: 1 addition & 1 deletion internal/build/gotool.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (g *GoToolchain) goTool(command string, args ...string) *exec.Cmd {
if g.Root == "" {
g.Root = runtime.GOROOT()
}
tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) // nolint: gosec
tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) //nolint:gosec
tool.Args = append(tool.Args, args...)
tool.Env = append(tool.Env, "GOROOT="+g.Root)

Expand Down
2 changes: 1 addition & 1 deletion triedb/pathdb/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func newStorageIdentQuery(address common.Address, addressHash common.Hash, stora
// the addressHash denotes the address hash of the associated account;
// the path denotes the path of the node within the trie;
//
// nolint:unused
//nolint:unused
func newTrienodeIdentQuery(addrHash common.Hash, path []byte) stateIdentQuery {
return stateIdentQuery{
stateIdent: newTrienodeIdent(addrHash, string(path)),
Expand Down
5 changes: 3 additions & 2 deletions triedb/pathdb/history_trienode.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,8 @@ func (r *trienodeHistoryReader) read(owner common.Hash, path string) ([]byte, er
}

// writeTrienodeHistory persists the trienode history associated with the given diff layer.
// nolint:unused
//
//nolint:unused
func writeTrienodeHistory(writer ethdb.AncientWriter, dl *diffLayer) error {
start := time.Now()
h := newTrienodeHistory(dl.rootHash(), dl.parent.rootHash(), dl.block, dl.nodes.nodeOrigin)
Expand All @@ -670,7 +671,7 @@ func writeTrienodeHistory(writer ethdb.AncientWriter, dl *diffLayer) error {
}

// readTrienodeMetadata resolves the metadata of the specified trienode history.
// nolint:unused
//nolint:unused
func readTrienodeMetadata(reader ethdb.AncientReader, id uint64) (*trienodeMetadata, error) {
header, err := rawdb.ReadTrienodeHistoryHeader(reader, id)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions triedb/pathdb/iterator_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ type accountBinaryIterator struct {
// newBinaryAccountIterator creates a simplistic account iterator to step over
// all the accounts in a slow, but easily verifiable way.
//
// nolint:all
//nolint:all
func (dl *diskLayer) newBinaryAccountIterator(seek common.Hash) AccountIterator {
return &accountBinaryIterator{
binaryIterator: dl.initBinaryAccountIterator(seek),
Expand Down Expand Up @@ -317,7 +317,7 @@ type storageBinaryIterator struct {
// newBinaryStorageIterator creates a simplistic account iterator to step over
// all the storage slots in a slow, but easily verifiable way.
//
// nolint:all
//nolint:all
func (dl *diskLayer) newBinaryStorageIterator(account common.Hash, seek common.Hash) StorageIterator {
return &storageBinaryIterator{
binaryIterator: dl.initBinaryStorageIterator(account, seek),
Expand Down