Add goimports lint (#54)

* Add `goimports` lint.

* Fix `goimports` issue.

* Fix group to `github.com/scroll-tech/go-thereum`.
This commit is contained in:
Steven 2022-03-24 16:53:59 +08:00 committed by GitHub
parent f8532484a6
commit b6cc89fabe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
196 changed files with 329 additions and 115 deletions

View file

@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2
- name: Lint
run: |
rm -rf $HOME/.cache/golangci-lint
rm -rf $HOME/.cache/golangci-lint
make lint
- name: Test
run: |
@ -20,3 +20,24 @@ jobs:
make test
- name: Upload coverage report
run: bash <(curl -s https://codecov.io/bash)
goimports-lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Install goimports
run: go get golang.org/x/tools/cmd/goimports
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- run: goimports -local github.com/scroll-tech/go-ethereum/ -w .
- run: go mod tidy
# If there are any diffs from goimports or go mod tidy, fail.
- name: Verify no changes from goimports and go mod tidy
run: |
if [ -n "$(git status --porcelain)" ]; then
exit 1
fi

View file

@ -23,6 +23,8 @@ import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
"github.com/scroll-tech/go-ethereum"
"github.com/scroll-tech/go-ethereum/accounts/abi"
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
@ -31,7 +33,6 @@ import (
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/stretchr/testify/assert"
)
func mockSign(addr common.Address, tx *types.Transaction) (*types.Transaction, error) { return tx, nil }

View file

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

View file

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

View file

@ -26,8 +26,9 @@ import (
"strings"
"testing"
"github.com/scroll-tech/go-ethereum/common"
"github.com/stretchr/testify/require"
"github.com/scroll-tech/go-ethereum/common"
)
// TestUnpack tests the general pack/unpack tests in packing_test.go

View file

@ -21,11 +21,12 @@ import (
"fmt"
"math/big"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/event"
"golang.org/x/crypto/sha3"
)
// Account represents an Ethereum account located at a specific location defined

View file

@ -28,6 +28,7 @@ import (
"time"
mapset "github.com/deckarep/golang-set"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/log"

View file

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

View file

@ -25,6 +25,7 @@ import (
"time"
mapset "github.com/deckarep/golang-set"
"github.com/scroll-tech/go-ethereum/log"
)

View file

@ -30,6 +30,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/crypto"

View file

@ -39,12 +39,13 @@ import (
"path/filepath"
"github.com/google/uuid"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/crypto/scrypt"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/math"
"github.com/scroll-tech/go-ethereum/crypto"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/crypto/scrypt"
)
const (

View file

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

View file

@ -23,6 +23,7 @@ import (
"time"
"github.com/rjeczalik/notify"
"github.com/scroll-tech/go-ethereum/log"
)

View file

@ -42,6 +42,7 @@ import (
"time"
pcsc "github.com/gballet/go-libpcsclite"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/event"

View file

@ -27,9 +27,10 @@ import (
"fmt"
pcsc "github.com/gballet/go-libpcsclite"
"github.com/scroll-tech/go-ethereum/crypto"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/text/unicode/norm"
"github.com/scroll-tech/go-ethereum/crypto"
)
const (

View file

@ -34,13 +34,14 @@ import (
"time"
pcsc "github.com/gballet/go-libpcsclite"
"github.com/status-im/keycard-go/derivationpath"
"github.com/scroll-tech/go-ethereum"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/log"
"github.com/status-im/keycard-go/derivationpath"
)
// ErrPairingPasswordNeeded is returned if opening the smart card requires pairing with a pairing

View file

@ -24,6 +24,7 @@ import (
"time"
"github.com/karalabe/usb"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/event"
"github.com/scroll-tech/go-ethereum/log"

View file

@ -28,6 +28,7 @@ import (
"math/big"
"github.com/golang/protobuf/proto"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/usbwallet/trezor"
"github.com/scroll-tech/go-ethereum/common"

View file

@ -26,6 +26,7 @@ import (
"time"
"github.com/karalabe/usb"
"github.com/scroll-tech/go-ethereum"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"

View file

@ -59,6 +59,7 @@ import (
"time"
"github.com/cespare/cp"
"github.com/scroll-tech/go-ethereum/crypto/signify"
"github.com/scroll-tech/go-ethereum/internal/build"
"github.com/scroll-tech/go-ethereum/params"

View file

@ -25,6 +25,8 @@ import (
"regexp"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/abi"
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
"github.com/scroll-tech/go-ethereum/cmd/utils"
@ -32,7 +34,6 @@ import (
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/internal/flags"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -19,6 +19,8 @@ package main
import (
"strconv"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
"github.com/scroll-tech/go-ethereum/accounts/external"
@ -28,7 +30,6 @@ import (
"github.com/scroll-tech/go-ethereum/ethclient"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rpc"
"gopkg.in/urfave/cli.v1"
)
// newClient creates a client with specified remote URL.

View file

@ -25,6 +25,8 @@ import (
"strings"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
@ -36,7 +38,6 @@ import (
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rpc"
"gopkg.in/urfave/cli.v1"
)
var commandDeploy = cli.Command{

View file

@ -22,10 +22,11 @@ import (
"fmt"
"os"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common/fdlimit"
"github.com/scroll-tech/go-ethereum/internal/flags"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -19,9 +19,10 @@ package main
import (
"fmt"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
"gopkg.in/urfave/cli.v1"
)
var commandStatus = cli.Command{

View file

@ -37,6 +37,8 @@ import (
"github.com/mattn/go-colorable"
"github.com/mattn/go-isatty"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
@ -56,7 +58,6 @@ import (
"github.com/scroll-tech/go-ethereum/signer/fourbyte"
"github.com/scroll-tech/go-ethereum/signer/rules"
"github.com/scroll-tech/go-ethereum/signer/storage"
"gopkg.in/urfave/cli.v1"
)
const legalWarning = `

View file

@ -22,13 +22,14 @@ import (
"strings"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/devp2p/internal/v4test"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/p2p/discover"
"github.com/scroll-tech/go-ethereum/p2p/enode"
"github.com/scroll-tech/go-ethereum/params"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -20,10 +20,11 @@ import (
"fmt"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/devp2p/internal/v5test"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/p2p/discover"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -22,9 +22,10 @@ import (
"strings"
"github.com/cloudflare/cloudflare-go"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/p2p/dnsdisc"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -30,9 +30,10 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/route53"
"github.com/aws/aws-sdk-go-v2/service/route53/types"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/p2p/dnsdisc"
"gopkg.in/urfave/cli.v1"
)
const (

View file

@ -25,12 +25,13 @@ import (
"path/filepath"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/console/prompt"
"github.com/scroll-tech/go-ethereum/p2p/dnsdisc"
"github.com/scroll-tech/go-ethereum/p2p/enode"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -28,10 +28,11 @@ import (
"strconv"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/p2p/enode"
"github.com/scroll-tech/go-ethereum/p2p/enr"
"github.com/scroll-tech/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
var enrdumpCommand = cli.Command{

View file

@ -21,9 +21,10 @@ import (
"strconv"
"testing"
"github.com/stretchr/testify/assert"
"github.com/scroll-tech/go-ethereum/eth/protocols/eth"
"github.com/scroll-tech/go-ethereum/p2p"
"github.com/stretchr/testify/assert"
)
// TestEthProtocolNegotiation tests whether the test suite

View file

@ -24,6 +24,7 @@ import (
"time"
"github.com/davecgh/go-spew/spew"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"

View file

@ -20,9 +20,10 @@ import (
"fmt"
"net"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/p2p/enode"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -22,10 +22,11 @@ import (
"path/filepath"
"sort"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/internal/debug"
"github.com/scroll-tech/go-ethereum/p2p/enode"
"github.com/scroll-tech/go-ethereum/params"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -25,11 +25,12 @@ import (
"strings"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/core/forkid"
"github.com/scroll-tech/go-ethereum/p2p/enr"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -20,13 +20,14 @@ import (
"fmt"
"net"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/devp2p/internal/ethtest"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/internal/utesting"
"github.com/scroll-tech/go-ethereum/p2p"
"github.com/scroll-tech/go-ethereum/p2p/rlpx"
"github.com/scroll-tech/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -19,10 +19,11 @@ package main
import (
"os"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/devp2p/internal/v4test"
"github.com/scroll-tech/go-ethereum/internal/utesting"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -21,9 +21,10 @@ import (
"io/ioutil"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"gopkg.in/urfave/cli.v1"
)
var newPassphraseFlag = cli.StringFlag{

View file

@ -24,10 +24,11 @@ import (
"path/filepath"
"github.com/google/uuid"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/crypto"
"gopkg.in/urfave/cli.v1"
)
type outputGenerate struct {

View file

@ -21,10 +21,11 @@ import (
"fmt"
"io/ioutil"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/crypto"
"gopkg.in/urfave/cli.v1"
)
type outputInspect struct {

View file

@ -20,8 +20,9 @@ import (
"fmt"
"os"
"github.com/scroll-tech/go-ethereum/internal/flags"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/internal/flags"
)
const (

View file

@ -21,11 +21,12 @@ import (
"fmt"
"io/ioutil"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/crypto"
"gopkg.in/urfave/cli.v1"
)
type outputSign struct {

View file

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

View file

@ -22,9 +22,10 @@ import (
"io/ioutil"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/crypto"
"gopkg.in/urfave/cli.v1"
)
// getPassphrase obtains a passphrase given by the user. It first checks the

View file

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

View file

@ -24,6 +24,8 @@ import (
"math/big"
"os"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/common/math"
@ -33,7 +35,6 @@ import (
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
//go:generate gencodec -type header -field-override headerMarshaling -out gen_header.go

View file

@ -21,6 +21,8 @@ import (
"math/big"
"os"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/math"
"github.com/scroll-tech/go-ethereum/consensus/ethash"
@ -36,7 +38,6 @@ import (
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/trie"
"golang.org/x/crypto/sha3"
)
type Prestate struct {

View file

@ -20,9 +20,10 @@ import (
"fmt"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/core/vm"
"github.com/scroll-tech/go-ethereum/tests"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -24,6 +24,8 @@ import (
"os"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/core"
@ -32,7 +34,6 @@ import (
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/tests"
"gopkg.in/urfave/cli.v1"
)
type result struct {

View file

@ -27,6 +27,8 @@ import (
"path"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/core"
@ -38,7 +40,6 @@ import (
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/tests"
"gopkg.in/urfave/cli.v1"
)
const (

View file

@ -22,10 +22,11 @@ import (
"math/big"
"os"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/evm/internal/t8ntool"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/internal/flags"
"gopkg.in/urfave/cli.v1"
)
var gitCommit = "" // Git SHA1 commit hash of the release (set via linker flags)

View file

@ -28,6 +28,8 @@ import (
"testing"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/evm/internal/compiler"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
@ -38,7 +40,6 @@ import (
"github.com/scroll-tech/go-ethereum/core/vm/runtime"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/params"
"gopkg.in/urfave/cli.v1"
)
var runCommand = cli.Command{

View file

@ -9,6 +9,7 @@ import (
"testing"
"github.com/docker/docker/pkg/reexec"
"github.com/scroll-tech/go-ethereum/cmd/evm/internal/t8ntool"
"github.com/scroll-tech/go-ethereum/internal/cmdtest"
)

View file

@ -42,6 +42,7 @@ import (
"time"
"github.com/gorilla/websocket"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"

View file

@ -20,12 +20,13 @@ import (
"fmt"
"io/ioutil"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -26,6 +26,8 @@ import (
"sync/atomic"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
@ -38,7 +40,6 @@ import (
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/metrics"
"github.com/scroll-tech/go-ethereum/node"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -25,9 +25,9 @@ import (
"reflect"
"unicode"
"github.com/naoina/toml"
"gopkg.in/urfave/cli.v1"
"github.com/naoina/toml"
"github.com/scroll-tech/go-ethereum/accounts/external"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/accounts/scwallet"

View file

@ -22,11 +22,12 @@ import (
"path/filepath"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/console"
"github.com/scroll-tech/go-ethereum/node"
"github.com/scroll-tech/go-ethereum/rpc"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -29,6 +29,8 @@ import (
"syscall"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
@ -37,7 +39,6 @@ import (
"github.com/scroll-tech/go-ethereum/ethdb"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/trie"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -23,10 +23,11 @@ import (
"strconv"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/consensus/ethash"
"github.com/scroll-tech/go-ethereum/params"
"gopkg.in/urfave/cli.v1"
)
var (

View file

@ -25,6 +25,7 @@ import (
"time"
"github.com/docker/docker/pkg/reexec"
"github.com/scroll-tech/go-ethereum/internal/cmdtest"
"github.com/scroll-tech/go-ethereum/rpc"
)

View file

@ -23,6 +23,8 @@ import (
"os"
"time"
cli "gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/rawdb"
@ -34,7 +36,6 @@ import (
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/trie"
cli "gopkg.in/urfave/cli.v1"
)
var (

View file

@ -22,10 +22,11 @@ import (
"io"
"sort"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/cmd/utils"
"github.com/scroll-tech/go-ethereum/internal/debug"
"github.com/scroll-tech/go-ethereum/internal/flags"
"gopkg.in/urfave/cli.v1"
)
// AppHelpFlagGroups is the application flags, grouped by functionality.

View file

@ -26,8 +26,9 @@ import (
"strings"
"github.com/jedisct1/go-minisign"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/log"
)
var gethPubKeys []string = []string{

View file

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

View file

@ -25,6 +25,7 @@ import (
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/scroll-tech/go-ethereum/core"
)

View file

@ -23,8 +23,9 @@ import (
"strings"
"time"
"github.com/scroll-tech/go-ethereum/log"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/log"
)
// main is just a boring entry point to set up the CLI app.

View file

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

View file

@ -31,11 +31,12 @@ import (
"sync"
"github.com/peterh/liner"
"golang.org/x/crypto/ssh/terminal"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/console/prompt"
"github.com/scroll-tech/go-ethereum/core"
"github.com/scroll-tech/go-ethereum/log"
"golang.org/x/crypto/ssh/terminal"
)
// config contains all the configurations needed by puppeth that should be saved

View file

@ -24,6 +24,7 @@ import (
"sync"
"github.com/olekukonko/tablewriter"
"github.com/scroll-tech/go-ethereum/core"
"github.com/scroll-tech/go-ethereum/log"
)

View file

@ -30,6 +30,8 @@ import (
"syscall"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core"
"github.com/scroll-tech/go-ethereum/core/rawdb"
@ -41,7 +43,6 @@ import (
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/node"
"github.com/scroll-tech/go-ethereum/rlp"
"gopkg.in/urfave/cli.v1"
)
const (

View file

@ -26,8 +26,9 @@ import (
"path"
"strings"
"github.com/scroll-tech/go-ethereum/common/math"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/common/math"
)
// Custom type which is registered in the flags library which cli uses for

View file

@ -34,6 +34,9 @@ import (
"time"
pcsclite "github.com/gballet/go-libpcsclite"
gopsutil "github.com/shirou/gopsutil/mem"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/accounts/keystore"
"github.com/scroll-tech/go-ethereum/common"
@ -67,8 +70,6 @@ import (
"github.com/scroll-tech/go-ethereum/p2p/nat"
"github.com/scroll-tech/go-ethereum/p2p/netutil"
"github.com/scroll-tech/go-ethereum/params"
gopsutil "github.com/shirou/gopsutil/mem"
"gopkg.in/urfave/cli.v1"
)
func init() {

View file

@ -19,8 +19,9 @@ package utils
import (
"fmt"
"github.com/scroll-tech/go-ethereum/eth/ethconfig"
"gopkg.in/urfave/cli.v1"
"github.com/scroll-tech/go-ethereum/eth/ethconfig"
)
var ShowDeprecated = cli.Command{

View file

@ -28,8 +28,9 @@ import (
"reflect"
"strings"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common/hexutil"
)
// Lengths of hashes and addresses in bytes.

View file

@ -28,6 +28,8 @@ import (
"time"
lru "github.com/hashicorp/golang-lru"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/accounts"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
@ -42,7 +44,6 @@ import (
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/rpc"
"github.com/scroll-tech/go-ethereum/trie"
"golang.org/x/crypto/sha3"
)
const (

View file

@ -23,6 +23,7 @@ import (
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/ethdb"

View file

@ -27,11 +27,12 @@ import (
"time"
"unsafe"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/bitutil"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/log"
"golang.org/x/crypto/sha3"
)
const (

View file

@ -25,6 +25,8 @@ import (
"time"
mapset "github.com/deckarep/golang-set"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/math"
"github.com/scroll-tech/go-ethereum/consensus"
@ -34,7 +36,6 @@ import (
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/scroll-tech/go-ethereum/trie"
"golang.org/x/crypto/sha3"
)
// Ethash proof-of-work protocol constants.

View file

@ -20,6 +20,7 @@ import (
"math/big"
"github.com/holiman/uint256"
"github.com/scroll-tech/go-ethereum/core/types"
)

View file

@ -35,6 +35,7 @@ import (
"github.com/edsrzf/mmap-go"
"github.com/hashicorp/golang-lru/simplelru"
"github.com/scroll-tech/go-ethereum/consensus"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/metrics"

View file

@ -25,6 +25,7 @@ import (
"time"
"github.com/dop251/goja"
"github.com/scroll-tech/go-ethereum/accounts/scwallet"
"github.com/scroll-tech/go-ethereum/accounts/usbwallet"
"github.com/scroll-tech/go-ethereum/common/hexutil"

View file

@ -20,6 +20,7 @@ import (
"testing"
"github.com/dop251/goja"
"github.com/scroll-tech/go-ethereum/internal/jsre"
)

View file

@ -31,6 +31,7 @@ import (
"github.com/dop251/goja"
"github.com/mattn/go-colorable"
"github.com/peterh/liner"
"github.com/scroll-tech/go-ethereum/console/prompt"
"github.com/scroll-tech/go-ethereum/internal/jsre"
"github.com/scroll-tech/go-ethereum/internal/jsre/deps"

View file

@ -29,6 +29,7 @@ import (
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/common/mclock"

View file

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

View file

@ -27,6 +27,7 @@ import (
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/consensus"
"github.com/scroll-tech/go-ethereum/core/rawdb"

View file

@ -27,12 +27,13 @@ import (
"reflect"
"testing"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"golang.org/x/crypto/sha3"
)
// Tests block header storage and retrieval operations.

View file

@ -22,12 +22,13 @@ import (
"math/big"
"testing"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/ethdb"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"golang.org/x/crypto/sha3"
)
// testHasher is the helper tool for transaction/receipt list hashing.

View file

@ -25,6 +25,7 @@ import (
"time"
"github.com/olekukonko/tablewriter"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/ethdb"
"github.com/scroll-tech/go-ethereum/ethdb/leveldb"

View file

@ -27,6 +27,7 @@ import (
"time"
"github.com/prometheus/tsdb/fileutil"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/ethdb"
"github.com/scroll-tech/go-ethereum/log"

View file

@ -21,6 +21,7 @@ import (
"sync/atomic"
"github.com/golang/snappy"
"github.com/scroll-tech/go-ethereum/common/math"
"github.com/scroll-tech/go-ethereum/rlp"
)

View file

@ -28,6 +28,7 @@ import (
"sync/atomic"
"github.com/golang/snappy"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/log"
"github.com/scroll-tech/go-ethereum/metrics"

View file

@ -25,8 +25,9 @@ import (
"testing"
"time"
"github.com/scroll-tech/go-ethereum/metrics"
"github.com/stretchr/testify/require"
"github.com/scroll-tech/go-ethereum/metrics"
)
func init() {

View file

@ -27,9 +27,10 @@ import (
"sync"
"testing"
"github.com/stretchr/testify/require"
"github.com/scroll-tech/go-ethereum/ethdb"
"github.com/scroll-tech/go-ethereum/rlp"
"github.com/stretchr/testify/require"
)
var freezerTestTableDef = map[string]bool{"test": true}

View file

@ -21,6 +21,8 @@ import (
"math/big"
"testing"
"golang.org/x/crypto/sha3"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/consensus/ethash"
"github.com/scroll-tech/go-ethereum/core/rawdb"
@ -28,7 +30,6 @@ import (
"github.com/scroll-tech/go-ethereum/crypto"
"github.com/scroll-tech/go-ethereum/params"
"github.com/scroll-tech/go-ethereum/rlp"
"golang.org/x/crypto/sha3"
)
func getBlock(transactions int, uncles int, dataSize int) *types.Block {

View file

@ -22,6 +22,7 @@ import (
"github.com/VictoriaMetrics/fastcache"
lru "github.com/hashicorp/golang-lru"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/rawdb"
"github.com/scroll-tech/go-ethereum/core/types"

View file

@ -22,6 +22,7 @@ import (
"os"
bloomfilter "github.com/holiman/bloomfilter/v2"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/core/rawdb"
"github.com/scroll-tech/go-ethereum/log"

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