This commit is contained in:
islishude 2025-03-02 09:56:40 +08:00
parent 0b28df8e7b
commit 7888f922e7
16 changed files with 18 additions and 16 deletions

View File

@ -18,12 +18,12 @@ package accounts
import ( import (
"reflect" "reflect"
"slices"
"sort" "sort"
"sync" "sync"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"slices"
) )
// managerSubBufferSize determines how many incoming wallet events // managerSubBufferSize determines how many incoming wallet events

View File

@ -28,6 +28,7 @@ import (
"fmt" "fmt"
"math/big" "math/big"
"regexp" "regexp"
"slices"
"sort" "sort"
"strings" "strings"
"sync" "sync"
@ -41,7 +42,6 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
pcsc "github.com/gballet/go-libpcsclite" pcsc "github.com/gballet/go-libpcsclite"
"github.com/status-im/keycard-go/derivationpath" "github.com/status-im/keycard-go/derivationpath"
"slices"
) )
// ErrPairingPasswordNeeded is returned if opening the smart card requires pairing with a pairing // ErrPairingPasswordNeeded is returned if opening the smart card requires pairing with a pairing

View File

@ -22,6 +22,7 @@ import (
"fmt" "fmt"
"io" "io"
"math/big" "math/big"
"slices"
"sync" "sync"
"time" "time"
@ -32,7 +33,6 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/karalabe/hid" "github.com/karalabe/hid"
"slices"
) )
// Maximum time between wallet health checks to detect USB unplugs. // Maximum time between wallet health checks to detect USB unplugs.

View File

@ -19,12 +19,12 @@ package light
import ( import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"slices"
"github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/common/lru"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"slices"
) )
// canonicalStore stores instances of the given type in a database and caches // canonicalStore stores instances of the given type in a database and caches

View File

@ -21,6 +21,7 @@ import (
"crypto/rand" "crypto/rand"
"fmt" "fmt"
"reflect" "reflect"
"slices"
"sync" "sync"
"time" "time"
@ -34,7 +35,6 @@ import (
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/holiman/uint256" "github.com/holiman/uint256"
"slices"
) )
// Suite represents a structure used to test a node's conformance // Suite represents a structure used to test a node's conformance

View File

@ -19,6 +19,7 @@ package rawdb
import ( import (
"errors" "errors"
"fmt" "fmt"
"slices"
"sync" "sync"
"time" "time"
@ -26,7 +27,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"slices"
) )
const ( const (

View File

@ -25,6 +25,7 @@ import (
"math/big" "math/big"
"os" "os"
"path/filepath" "path/filepath"
"slices"
"sort" "sort"
"sync" "sync"
"time" "time"
@ -44,7 +45,6 @@ import (
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/holiman/billy" "github.com/holiman/billy"
"github.com/holiman/uint256" "github.com/holiman/uint256"
"slices"
) )
const ( const (

View File

@ -21,13 +21,13 @@ import (
"crypto/sha256" "crypto/sha256"
"fmt" "fmt"
"math/big" "math/big"
"slices"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/crypto/kzg4844"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/holiman/uint256" "github.com/holiman/uint256"
"slices"
) )
// BlobTx represents an EIP-4844 transaction. // BlobTx represents an EIP-4844 transaction.

View File

@ -19,6 +19,7 @@ package downloader
import ( import (
"fmt" "fmt"
"math/big" "math/big"
"slices"
"sync" "sync"
"sync/atomic" "sync/atomic"
"testing" "testing"
@ -38,7 +39,6 @@ import (
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"slices"
) )
// downloadTester is a test simulator for mocking out local block chain. // downloadTester is a test simulator for mocking out local block chain.

View File

@ -24,13 +24,14 @@ import (
"sort" "sort"
"time" "time"
"slices"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"slices"
) )
// scratchHeaders is the number of headers to store in a scratch space to allow // scratchHeaders is the number of headers to store in a scratch space to allow

View File

@ -25,13 +25,14 @@ import (
"testing" "testing"
"time" "time"
"slices"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/protocols/eth" "github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"slices"
) )
// hookedBackfiller is a tester backfiller with all interface methods mocked and // hookedBackfiller is a tester backfiller with all interface methods mocked and

View File

@ -19,6 +19,7 @@ package downloader
import ( import (
"fmt" "fmt"
"math/big" "math/big"
"slices"
"sync" "sync"
"time" "time"
@ -31,7 +32,6 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/triedb" "github.com/ethereum/go-ethereum/triedb"
"slices"
) )
// Test chain parameters. // Test chain parameters.

View File

@ -24,6 +24,7 @@ import (
gomath "math" gomath "math"
"math/big" "math/big"
"math/rand" "math/rand"
"slices"
"sort" "sort"
"sync" "sync"
"sync/atomic" "sync/atomic"
@ -42,7 +43,6 @@ import (
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie" "github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/trienode" "github.com/ethereum/go-ethereum/trie/trienode"
"slices"
) )
const ( const (

View File

@ -19,6 +19,7 @@ package native
import ( import (
"encoding/json" "encoding/json"
"math/big" "math/big"
"slices"
"strconv" "strconv"
"sync/atomic" "sync/atomic"
@ -28,7 +29,6 @@ import (
"github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/eth/tracers"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"slices"
) )
func init() { func init() {

View File

@ -28,6 +28,7 @@ import (
"net" "net"
"net/netip" "net/netip"
"reflect" "reflect"
"slices"
"sync" "sync"
"testing" "testing"
"time" "time"
@ -37,7 +38,6 @@ import (
"github.com/ethereum/go-ethereum/p2p/discover/v4wire" "github.com/ethereum/go-ethereum/p2p/discover/v4wire"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/p2p/enr"
"slices"
) )
// shared test variables // shared test variables

View File

@ -19,6 +19,7 @@ package trie
import ( import (
"errors" "errors"
"fmt" "fmt"
"slices"
"sync" "sync"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
@ -30,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics"
"slices"
) )
// ErrNotRequested is returned by the trie sync when it's requested to process a // ErrNotRequested is returned by the trie sync when it's requested to process a