Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable goimports and varcheck linters #16446

Merged
merged 17 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
build: gofmt all files
  • Loading branch information
thomasmodeneis committed Apr 6, 2018
commit 84c3eadfbc38d8ae4013360d5808d3847f3db4fb
2 changes: 1 addition & 1 deletion accounts/usbwallet/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const (
ledgerOpSignTransaction ledgerOpcode = 0x04 // Signs an Ethereum transaction after having the user validate the parameters
ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration

ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet
ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet
ledgerP1InitTransactionData ledgerParam1 = 0x00 // First transaction data block for signing
ledgerP1ContTransactionData ledgerParam1 = 0x80 // Subsequent transaction data block for signing
ledgerP2DiscardAddressChainCode ledgerParam2 = 0x00 // Do not return the chain code along with the address
Expand Down
1 change: 0 additions & 1 deletion core/asm/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ func (err compileError) Error() string {
return fmt.Sprintf("%d syntax error: unexpected %v, expected %v", err.lineno, err.got, err.want)
}


func compileErr(c token, got, want string) error {
return compileError{
got: got,
Expand Down
4 changes: 2 additions & 2 deletions core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
)

var (
bigZero = new(big.Int)
tt255 = math.BigPow(2, 255)
bigZero = new(big.Int)
tt255 = math.BigPow(2, 255)
errWriteProtection = errors.New("evm: write protection")
errReturnDataOutOfBounds = errors.New("evm: return data out of bounds")
errExecutionReverted = errors.New("evm: execution reverted")
Expand Down
1 change: 0 additions & 1 deletion les/bloombits.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ func (eth *LightEthereum) startBloomHandlers() {
}()
}
}

1 change: 0 additions & 1 deletion les/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/ethereum/go-ethereum/light"
)


// syncer is responsible for periodically synchronising with the network, both
// downloading hashes and blocks as well as handling the announcement handler.
func (pm *ProtocolManager) syncer() {
Expand Down
2 changes: 1 addition & 1 deletion p2p/discover/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
// Timeouts
const (
respTimeout = 500 * time.Millisecond
expiration = 20 * time.Second
expiration = 20 * time.Second

ntpFailureThreshold = 32 // Continuous timeouts after which to check NTP
ntpWarningCooldown = 10 * time.Minute // Minimum amount of time to pass before repeating NTP warning
Expand Down
4 changes: 2 additions & 2 deletions p2p/discv5/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ const Version = 4
var (
errPacketTooSmall = errors.New("too small")
errBadPrefix = errors.New("bad prefix")
errTimeout = errors.New("RPC timeout")
errTimeout = errors.New("RPC timeout")
)

// Timeouts
const (
respTimeout = 500 * time.Millisecond
expiration = 20 * time.Second
expiration = 20 * time.Second

driftThreshold = 10 * time.Second // Allowed clock drift before warning user
)
Expand Down
2 changes: 1 addition & 1 deletion p2p/enr/enr.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const SizeLimit = 300 // maximum encoded size of a node record in bytes
const ID_SECP256k1_KECCAK = ID("secp256k1-keccak") // the default identity scheme

var (
errNoID = errors.New("unknown or unspecified identity scheme")
errNoID = errors.New("unknown or unspecified identity scheme")
errInvalidSig = errors.New("invalid signature")
errNotSorted = errors.New("record key/value pairs are not sorted by key")
errDuplicateKey = errors.New("record contains duplicate key")
Expand Down
1 change: 0 additions & 1 deletion swarm/storage/netstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func NewNetStore(hash SwarmHasher, lstore *LocalStore, cloud CloudStore, params
}
}


var (
// timeout interval before retrieval is timed out
searchTimeout = 3 * time.Second
Expand Down
1 change: 0 additions & 1 deletion whisper/whisperv5/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)


var (
ErrSymAsym = errors.New("specify either a symmetric or an asymmetric key")
ErrInvalidSymmetricKey = errors.New("invalid symmetric key")
Expand Down
1 change: 0 additions & 1 deletion whisper/whisperv6/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)


// List of errors
var (
ErrSymAsym = errors.New("specify either a symmetric or an asymmetric key")
Expand Down