diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go index 57f4a7ffc5..7ad32dd1e8 100644 --- a/accounts/usbwallet/ledger.go +++ b/accounts/usbwallet/ledger.go @@ -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 diff --git a/core/asm/compiler.go b/core/asm/compiler.go index b430b6495c..3059b0a21c 100644 --- a/core/asm/compiler.go +++ b/core/asm/compiler.go @@ -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, diff --git a/core/vm/instructions.go b/core/vm/instructions.go index bb313f2a35..0689ee39cf 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -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") diff --git a/les/bloombits.go b/les/bloombits.go index 1b16f6de43..2871a90064 100644 --- a/les/bloombits.go +++ b/les/bloombits.go @@ -72,4 +72,3 @@ func (eth *LightEthereum) startBloomHandlers() { }() } } - diff --git a/les/sync.go b/les/sync.go index d32a3efb9c..c3d37e2f3f 100644 --- a/les/sync.go +++ b/les/sync.go @@ -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() { diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index 025f81282e..f6bcd97085 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -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 diff --git a/p2p/discv5/udp.go b/p2p/discv5/udp.go index 5b86698f29..09e5f8b374 100644 --- a/p2p/discv5/udp.go +++ b/p2p/discv5/udp.go @@ -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 ) diff --git a/p2p/enr/enr.go b/p2p/enr/enr.go index 9244076c96..c018895cc0 100644 --- a/p2p/enr/enr.go +++ b/p2p/enr/enr.go @@ -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") diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go index 2efc02b596..0552b84efa 100644 --- a/swarm/storage/netstore.go +++ b/swarm/storage/netstore.go @@ -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 diff --git a/whisper/whisperv5/api.go b/whisper/whisperv5/api.go index 48bb817cb9..9fb22aa752 100644 --- a/whisper/whisperv5/api.go +++ b/whisper/whisperv5/api.go @@ -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") diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go index d879b6d695..3f25785fec 100644 --- a/whisper/whisperv6/api.go +++ b/whisper/whisperv6/api.go @@ -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")