build: revert the changes to import lists

remove lint from travis go 1.9.x linux builder
errors reported by varcheck -> delete the variables instead of commenting them out
This commit is contained in:
Thomas Modeneis 2018-04-06 16:34:13 +02:00
parent b2e72fccd6
commit f77e0b46e0
107 changed files with 95 additions and 247 deletions

View file

@ -13,7 +13,6 @@ matrix:
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- go run build/ci.go test -coverage
- go run build/ci.go lint
# These are the latest Go versions.
- os: linux

View file

@ -40,9 +40,6 @@ test: all
lint: ## Run linters. Use make install-linters first.
build/env.sh go run build/ci.go lint
format: # Formats the code. Must have goimports installed
build/gofmt.sh
clean:
rm -fr build/_workspace/pkg/ $(GOBIN)/*

View file

@ -26,9 +26,8 @@ import (
"strings"
"testing"
"golang.org/x/tools/imports"
"github.com/ethereum/go-ethereum/common"
"golang.org/x/tools/imports"
)
var bindTests = []struct {

View file

@ -25,11 +25,10 @@ import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var jsonEventTransfer = []byte(`{

View file

@ -22,7 +22,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
)

View file

@ -26,9 +26,8 @@ import (
"strings"
"testing"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
)
type unpackTest struct {

View file

@ -27,11 +27,10 @@ import (
"sync"
"time"
"gopkg.in/fatih/set.v0"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"gopkg.in/fatih/set.v0"
)
// Minimum amount of time between cache reloads. This limit applies if the platform does

View file

@ -29,7 +29,6 @@ import (
"github.com/cespare/cp"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
)

View file

@ -29,11 +29,10 @@ import (
"strings"
"time"
"github.com/pborman/uuid"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/pborman/uuid"
)
const (

View file

@ -36,14 +36,13 @@ import (
"io/ioutil"
"path/filepath"
"github.com/pborman/uuid"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/crypto/scrypt"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/randentropy"
"github.com/pborman/uuid"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/crypto/scrypt"
)
const (

View file

@ -25,11 +25,10 @@ import (
"errors"
"fmt"
"github.com/pborman/uuid"
"golang.org/x/crypto/pbkdf2"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/crypto"
"github.com/pborman/uuid"
"golang.org/x/crypto/pbkdf2"
)
// creates a Key and stores that in the given KeyStore by decrypting a presale key JSON

View file

@ -21,9 +21,8 @@ package keystore
import (
"time"
"github.com/rjeczalik/notify"
"github.com/ethereum/go-ethereum/log"
"github.com/rjeczalik/notify"
)
type watcher struct {

View file

@ -22,11 +22,10 @@ import (
"sync"
"time"
"github.com/karalabe/hid"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/log"
"github.com/karalabe/hid"
)
// LedgerScheme is the protocol scheme prefixing account and wallet URLs.

View file

@ -53,11 +53,9 @@ const (
ledgerOpGetConfiguration ledgerOpcode = 0x06 // Returns specific wallet application configuration
ledgerP1DirectlyFetchAddress ledgerParam1 = 0x00 // Return address directly from the wallet
//ledgerP1ConfirmFetchAddress ledgerParam1 = 0x01 // Require a user confirmation before returning the address
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
//ledgerP2ReturnAddressChainCode ledgerParam2 = 0x01 // Require a user confirmation before returning the address
)
// errLedgerReplyInvalidHeader is the error message returned by a Ledger data exchange

View file

@ -27,14 +27,13 @@ import (
"io"
"math/big"
"github.com/golang/protobuf/proto"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/usbwallet/internal/trezor"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/golang/protobuf/proto"
)
// ErrTrezorPINNeeded is returned if opening the trezor requires a PIN code. In

View file

@ -25,13 +25,12 @@ import (
"sync"
"time"
"github.com/karalabe/hid"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/karalabe/hid"
)
// Maximum time between wallet health checks to detect USB unplugs.

View file

@ -23,12 +23,11 @@ import (
"os"
"path/filepath"
"github.com/pborman/uuid"
"gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/crypto"
"github.com/pborman/uuid"
"gopkg.in/urfave/cli.v1"
)
type outputGenerate struct {

View file

@ -53,10 +53,6 @@ var (
Name: "json",
Usage: "output JSON instead of human-readable format",
}
//messageFlag = cli.StringFlag{
// Name: "message",
// Usage: "the file that contains the message to sign/verify",
//}
)
func main() {

View file

@ -22,7 +22,6 @@ import (
"testing"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/internal/cmdtest"
)

View file

@ -22,9 +22,8 @@ import (
"io/ioutil"
"strings"
cli "gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/core/asm"
cli "gopkg.in/urfave/cli.v1"
)
var disasmCommand = cli.Command{

View file

@ -27,8 +27,6 @@ import (
goruntime "runtime"
cli "gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/cmd/evm/internal/compiler"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
@ -39,6 +37,7 @@ import (
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
cli "gopkg.in/urfave/cli.v1"
)
var runCommand = cli.Command{

View file

@ -41,8 +41,6 @@ import (
"sync"
"time"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
@ -60,6 +58,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/params"
"golang.org/x/net/websocket"
)
var (

View file

@ -29,9 +29,8 @@ import (
"github.com/ethereum/go-ethereum/cmd/internal/browser"
"github.com/ethereum/go-ethereum/params"
cli "gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/cmd/utils"
cli "gopkg.in/urfave/cli.v1"
)
var bugCommand = cli.Command{

View file

@ -27,14 +27,13 @@ import (
cli "gopkg.in/urfave/cli.v1"
"github.com/naoina/toml"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/dashboard"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"github.com/naoina/toml"
)
var (

View file

@ -23,7 +23,6 @@ import (
"testing"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/internal/cmdtest"
)

View file

@ -45,14 +45,13 @@ import (
"strings"
"text/tabwriter"
"gopkg.in/urfave/cli.v1"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/p2p/simulations"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
"github.com/ethereum/go-ethereum/rpc"
"gopkg.in/urfave/cli.v1"
)
var client *simulations.Client

View file

@ -28,10 +28,9 @@ import (
"path/filepath"
"strings"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/terminal"
"github.com/ethereum/go-ethereum/log"
)
// sshClient is a small wrapper around Go's SSH client with a few utility methods

View file

@ -30,11 +30,10 @@ import (
"strings"
"sync"
"golang.org/x/crypto/ssh/terminal"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/crypto/ssh/terminal"
)
// config contains all the configurations needed by puppeth that should be saved

View file

@ -23,10 +23,9 @@ import (
"strings"
"sync"
"github.com/olekukonko/tablewriter"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/log"
"github.com/olekukonko/tablewriter"
)
// networkStats verifies the status of network components and generates a protip

View file

@ -28,12 +28,11 @@ import (
cli "gopkg.in/urfave/cli.v1"
"github.com/naoina/toml"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/naoina/toml"
bzzapi "github.com/ethereum/go-ethereum/swarm/api"
)

View file

@ -27,7 +27,6 @@ import (
"time"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/internal/cmdtest"

View file

@ -35,8 +35,6 @@ import (
"strings"
"time"
"golang.org/x/crypto/pbkdf2"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/console"
@ -47,6 +45,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/whisper/mailserver"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"golang.org/x/crypto/pbkdf2"
)
const quitCommand = "~Q"

View file

@ -25,8 +25,6 @@ import (
"sync"
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
@ -41,6 +39,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
lru "github.com/hashicorp/golang-lru"
)
const (

View file

@ -20,12 +20,11 @@ import (
"bytes"
"encoding/json"
lru "github.com/hashicorp/golang-lru"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/params"
lru "github.com/hashicorp/golang-lru"
)
// Vote represents a single vote that an authorized signer made to modify the

View file

@ -18,13 +18,12 @@
package consensus
import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
"math/big"
)
// ChainReader defines a small collection of methods needed to access the local

View file

@ -24,8 +24,6 @@ import (
"runtime"
"time"
set "gopkg.in/fatih/set.v0"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/consensus"
@ -33,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/params"
set "gopkg.in/fatih/set.v0"
)
// Ethash proof-of-work protocol constants.

View file

@ -33,12 +33,11 @@ import (
"unsafe"
mmap "github.com/edsrzf/mmap-go"
"github.com/hashicorp/golang-lru/simplelru"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/rpc"
"github.com/hashicorp/golang-lru/simplelru"
)
var ErrInvalidDumpMagic = errors.New("invalid dump magic")

View file

@ -23,11 +23,10 @@ import (
"strings"
"time"
"github.com/robertkrimen/otto"
"github.com/ethereum/go-ethereum/accounts/usbwallet"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rpc"
"github.com/robertkrimen/otto"
)
// bridge is a collection of JavaScript utility methods to bride the .js runtime

View file

@ -28,13 +28,12 @@ import (
"strings"
"syscall"
"github.com/mattn/go-colorable"
"github.com/peterh/liner"
"github.com/robertkrimen/otto"
"github.com/ethereum/go-ethereum/internal/jsre"
"github.com/ethereum/go-ethereum/internal/web3ext"
"github.com/ethereum/go-ethereum/rpc"
"github.com/mattn/go-colorable"
"github.com/peterh/liner"
"github.com/robertkrimen/otto"
)
var (

View file

@ -263,10 +263,6 @@ func (err compileError) Error() string {
return fmt.Sprintf("%d syntax error: unexpected %v, expected %v", err.lineno, err.got, err.want)
}
//var (
// errExpBol = errors.New("expected beginning of line")
// errExpElementOrLabel = errors.New("expected beginning of line")
//)
func compileErr(c token, got, want string) error {
return compileError{

View file

@ -22,7 +22,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core/vm"

View file

@ -26,14 +26,13 @@ import (
"sync/atomic"
"time"
"github.com/hashicorp/golang-lru"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/hashicorp/golang-lru"
)
const (

View file

@ -20,11 +20,10 @@ import (
"fmt"
"sync"
lru "github.com/hashicorp/golang-lru"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/trie"
lru "github.com/hashicorp/golang-lru"
)
// Trie cache generation limit after which to evict trie nodes from memory.

View file

@ -21,11 +21,10 @@ import (
"math/big"
"testing"
checker "gopkg.in/check.v1"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
checker "gopkg.in/check.v1"
)
type StateSuite struct {

View file

@ -25,8 +25,6 @@ import (
"sync"
"time"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
@ -34,13 +32,13 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/params"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
const (
// chainHeadChanSize is the size of channel listening to ChainHeadEvent.
chainHeadChanSize = 10
// rmTxChanSize is the size of channel listening to RemovedTransactionEvent.
//rmTxChanSize = 10
)
var (

View file

@ -23,7 +23,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
)

View file

@ -33,7 +33,6 @@ import (
var (
ErrInvalidSig = errors.New("invalid transaction v, r, s values")
//errNoSigner = errors.New("missing signing methods")
)
// deriveSigner makes a *best* guess about which signer to use.

View file

@ -21,13 +21,12 @@ import (
"errors"
"math/big"
"golang.org/x/crypto/ripemd160"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/bn256"
"github.com/ethereum/go-ethereum/params"
"golang.org/x/crypto/ripemd160"
)
// PrecompiledContract is the basic interface for native Go contracts. The implementation

View file

@ -31,7 +31,6 @@ import (
var (
bigZero = new(big.Int)
tt255 = math.BigPow(2, 255)
//tt256 = math.BigPow(2, 256)
errWriteProtection = errors.New("evm: write protection")
errReturnDataOutOfBounds = errors.New("evm: return data out of bounds")
errExecutionReverted = errors.New("evm: execution reverted")

View file

@ -33,13 +33,12 @@ import (
"time"
"github.com/elastic/gosigar"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
"golang.org/x/net/websocket"
)
const (

View file

@ -21,7 +21,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/ethdb"

View file

@ -25,12 +25,11 @@ import (
"sync"
"time"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
var (

View file

@ -22,12 +22,11 @@ import (
"math/rand"
"time"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
const (

View file

@ -25,13 +25,12 @@ import (
"time"
"unsafe"
duktape "gopkg.in/olebedev/go-duktape.v3"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
duktape "gopkg.in/olebedev/go-duktape.v3"
)
// bigIntegerJS is the minified version of https://github.com/peterolson/BigInteger.js.

View file

@ -22,15 +22,14 @@ import (
"sync"
"time"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/syndtr/goleveldb/leveldb"
"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"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
)
var OpenFileLimit = 64

View file

@ -30,8 +30,6 @@ import (
"strings"
"time"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/mclock"
"github.com/ethereum/go-ethereum/consensus"
@ -43,6 +41,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
"golang.org/x/net/websocket"
)
const (

View file

@ -24,12 +24,11 @@ import (
"os"
"runtime"
colorable "github.com/mattn/go-colorable"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log/term"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics/exp"
colorable "github.com/mattn/go-colorable"
"gopkg.in/urfave/cli.v1"
)

View file

@ -26,9 +26,6 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common"
@ -44,6 +41,8 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
)
const (

View file

@ -26,10 +26,9 @@ import (
"math/rand"
"time"
"github.com/robertkrimen/otto"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/internal/jsre/deps"
"github.com/robertkrimen/otto"
)
var (

View file

@ -73,12 +73,3 @@ func (eth *LightEthereum) startBloomHandlers() {
}
}
const (
// bloomConfirms is the number of confirmation blocks before a bloom section is
// considered probably final and its rotated bits are calculated.
//bloomConfirms = 256
// bloomThrottling is the time to wait between processing two consecutive index
// sections. It's useful during chain upgrades to prevent disk overload.
//bloomThrottling = 100 * time.Millisecond
)

View file

@ -73,7 +73,6 @@ const (
// and a short term value which is adjusted exponentially with a factor of
// pstatRecentAdjust with each dial/connection and also returned exponentially
// to the average with the time constant pstatReturnToMeanTC
//pstatRecentAdjust = 0.1
pstatReturnToMeanTC = time.Hour
// node address selection weight is dropped by a factor of exp(-addrFailDropLn) after
// each unsuccessful connection (restored after a successful one)
@ -83,9 +82,6 @@ const (
responseScoreTC = time.Millisecond * 100
delayScoreTC = time.Second * 5
timeoutPow = 10
// peerSelectMinWeight is added to calculated weights at request peer selection
// to give poorly performing peers a little chance of coming back
//peerSelectMinWeight = 0.005
// initStatsWeight is used to initialize previously unknown peers with good
// statistics to give a chance to prove themselves
initStatsWeight = 1

View file

@ -25,10 +25,6 @@ import (
"github.com/ethereum/go-ethereum/light"
)
const (
//forceSyncCycle = 10 * time.Second // Time interval to force syncs, even if few peers are available
//minDesiredPeerCount = 5 // Amount of peers desired to start syncing
)
// syncer is responsible for periodically synchronising with the network, both
// downloading hashes and blocks as well as handling the announcement handler.

View file

@ -23,7 +23,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/state"

View file

@ -6,9 +6,8 @@ import (
uurl "net/url"
"time"
"github.com/influxdata/influxdb/client"
"github.com/ethereum/go-ethereum/metrics"
"github.com/influxdata/influxdb/client"
)
type reporter struct {

View file

@ -26,8 +26,6 @@ import (
"strings"
"sync"
"github.com/prometheus/prometheus/util/flock"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
@ -35,6 +33,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rpc"
"github.com/prometheus/prometheus/util/flock"
)
// Node is a container on which services can be registered.

View file

@ -24,7 +24,6 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/p2p/netutil"
)

View file

@ -27,16 +27,15 @@ import (
"sync"
"time"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/errors"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/storage"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
)
var (

View file

@ -49,7 +49,6 @@ var (
// Timeouts
const (
respTimeout = 500 * time.Millisecond
//sendTimeout = 500 * time.Millisecond
expiration = 20 * time.Second
ntpFailureThreshold = 32 // Continuous timeouts after which to check NTP

View file

@ -34,7 +34,6 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"

View file

@ -28,16 +28,15 @@ import (
"sync"
"time"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/errors"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/storage"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
)
var (

View file

@ -36,7 +36,6 @@ import (
var (
errInvalidEvent = errors.New("invalid in current state")
errNoQuery = errors.New("no pending query")
//errWrongAddress = errors.New("unknown sender address")
)
const (
@ -828,8 +827,6 @@ type nodeEvent uint
//go:generate stringer -type=nodeEvent
const (
//invalidEvent
//nodeEvent = iota // zero is reserved
// Packet type events.
// These correspond to packet types in the UDP protocol.

View file

@ -38,7 +38,6 @@ const (
hashBits = len(common.Hash{}) * 8
nBuckets = hashBits + 1 // Number of buckets
//maxBondingPingPongs = 16
maxFindnodeFailures = 5
)

View file

@ -38,22 +38,14 @@ const Version = 4
var (
errPacketTooSmall = errors.New("too small")
errBadPrefix = errors.New("bad prefix")
//errExpired = errors.New("expired")
//errUnsolicitedReply = errors.New("unsolicited reply")
//errUnknownNode = errors.New("unknown node")
errTimeout = errors.New("RPC timeout")
//errClockWarp = errors.New("reply deadline too far in the future")
//errClosed = errors.New("socket closed")
)
// Timeouts
const (
respTimeout = 500 * time.Millisecond
//queryDelay = 1000 * time.Millisecond
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
driftThreshold = 10 * time.Second // Allowed clock drift before warning user
)

View file

@ -26,7 +26,6 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
@ -38,10 +37,6 @@ func init() {
// shared test variables
var (
//futureExp = uint64(time.Now().Add(10 * time.Hour).Unix())
//testTarget = NodeID{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1}
//testRemote = rpcEndpoint{IP: net.ParseIP("1.1.1.1").To4(), UDP: 1, TCP: 2}
//testLocalAnnounced = rpcEndpoint{IP: net.ParseIP("2.2.2.2").To4(), UDP: 3, TCP: 4}
testLocal = rpcEndpoint{IP: net.ParseIP("3.3.3.3").To4(), UDP: 5, TCP: 6}
)

View file

@ -46,7 +46,6 @@ const ID_SECP256k1_KECCAK = ID("secp256k1-keccak") // the default identity schem
var (
errNoID = errors.New("unknown or unspecified identity scheme")
//errInvalidSigsize = errors.New("invalid signature size")
errInvalidSig = errors.New("invalid signature")
errNotSorted = errors.New("record key/value pairs are not sorted by key")
errDuplicateKey = errors.New("record contains duplicate key")

View file

@ -24,11 +24,10 @@ import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
var (

View file

@ -47,8 +47,6 @@ const (
discMsg = 0x01
pingMsg = 0x02
pongMsg = 0x03
//getPeersMsg = 0x04
//peersMsg = 0x05
)
// protoHandshake is the RLP structure of the protocol handshake.

View file

@ -35,14 +35,13 @@ import (
"sync"
"time"
"github.com/golang/snappy"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/ecies"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/rlp"
"github.com/golang/snappy"
)
const (

View file

@ -31,7 +31,6 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/ecies"
"github.com/ethereum/go-ethereum/crypto/sha3"

View file

@ -28,7 +28,6 @@ import (
"strings"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/discover"

View file

@ -36,13 +36,12 @@ import (
"time"
"github.com/docker/docker/pkg/reexec"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/rpc"
"golang.org/x/net/websocket"
)
// ExecAdapter is a NodeAdapter which runs simulation nodes by executing the

View file

@ -25,7 +25,6 @@ import (
"os"
"github.com/docker/docker/pkg/reexec"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p"

View file

@ -29,14 +29,13 @@ import (
"strings"
"sync"
"github.com/julienschmidt/httprouter"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discover"
"github.com/ethereum/go-ethereum/p2p/simulations/adapters"
"github.com/ethereum/go-ethereum/rpc"
"github.com/julienschmidt/httprouter"
"golang.org/x/net/websocket"
)
// DefaultClient is the default simulation API client which expects the API

View file

@ -31,7 +31,6 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/log"
)

View file

@ -29,9 +29,8 @@ import (
"strings"
"time"
"golang.org/x/net/websocket"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/net/websocket"
"gopkg.in/fatih/set.v0"
)

View file

@ -35,13 +35,12 @@ import (
"strings"
"time"
"github.com/rs/cors"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/swarm/api"
"github.com/ethereum/go-ethereum/swarm/storage"
"github.com/rs/cors"
)
//setup metrics

View file

@ -19,13 +19,12 @@
package fuse
import (
"os"
"path/filepath"
"sync"
"bazil.org/fuse"
"bazil.org/fuse/fs"
"golang.org/x/net/context"
"os"
"path/filepath"
"sync"
)
var (

View file

@ -26,10 +26,9 @@ import (
"bazil.org/fuse"
"bazil.org/fuse/fs"
"golang.org/x/net/context"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/swarm/storage"
"golang.org/x/net/context"
)
const (

View file

@ -17,10 +17,9 @@
package fuse
import (
"github.com/ethereum/go-ethereum/swarm/api"
"sync"
"time"
"github.com/ethereum/go-ethereum/swarm/api"
)
const (

View file

@ -29,7 +29,6 @@ import (
"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/swarm/api"

View file

@ -20,11 +20,10 @@ import (
"encoding/binary"
"fmt"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/swarm/storage"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
)
const counterKeyPrefix = 0x01

View file

@ -22,11 +22,10 @@ package storage
import (
"fmt"
"github.com/ethereum/go-ethereum/compression/rle"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/ethereum/go-ethereum/compression/rle"
)
const openFileLimit = 128

View file

@ -32,12 +32,11 @@ import (
"io/ioutil"
"sync"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/rlp"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/iterator"
)
//metrics variables
@ -55,7 +54,6 @@ const (
// key prefixes for leveldb storage
kpIndex = 0
//kpData = 1
)
var (

View file

@ -83,10 +83,6 @@ func NewNetStore(hash SwarmHasher, lstore *LocalStore, cloud CloudStore, params
}
}
const (
// maximum number of peers that a retrieved message is delivered to
//requesterCount = 3
)
var (
// timeout interval before retrieval is timed out

View file

@ -20,10 +20,9 @@ import (
"errors"
"fmt"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethdb"
"gopkg.in/karalabe/cookiejar.v2/collections/prque"
)
// ErrNotRequested is returned by the trie sync when it's requested to process a

View file

@ -30,7 +30,6 @@ import (
"testing/quick"
"github.com/davecgh/go-spew/spew"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"

View file

@ -20,15 +20,14 @@ import (
"encoding/binary"
"fmt"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
)
type WMailServer struct {

View file

@ -32,9 +32,6 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)
const (
//filterTimeout = 300 // filters are considered timeout out after filterTimeout seconds
)
var (
ErrSymAsym = errors.New("specify either a symmetric or an asymmetric key")

View file

@ -20,12 +20,11 @@ import (
"fmt"
"time"
set "gopkg.in/fatih/set.v0"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/rlp"
set "gopkg.in/fatih/set.v0"
)
// peer represents a whisper protocol peer connection.

Some files were not shown because too many files have changed in this diff Show more