From fc663874c872690f814d2c8ff92c1f195a3c2cdd Mon Sep 17 00:00:00 2001 From: islishude Date: Sun, 2 Mar 2025 10:00:38 +0800 Subject: [PATCH] gofmt --- cmd/devp2p/crawl.go | 2 +- consensus/clique/api.go | 2 +- core/blockchain_test.go | 2 +- core/state/snapshot/difflayer_test.go | 2 +- core/txpool/txpool.go | 2 +- rpc/client_opt.go | 2 +- rpc/websocket.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/devp2p/crawl.go b/cmd/devp2p/crawl.go index 4b3dfb542d..20273de7b6 100644 --- a/cmd/devp2p/crawl.go +++ b/cmd/devp2p/crawl.go @@ -18,13 +18,13 @@ package main import ( "errors" + "maps" "sync" "sync/atomic" "time" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/enode" - "maps" ) type crawler struct { diff --git a/consensus/clique/api.go b/consensus/clique/api.go index 090ec7b9ed..986f836ac6 100644 --- a/consensus/clique/api.go +++ b/consensus/clique/api.go @@ -19,6 +19,7 @@ package clique import ( "encoding/json" "fmt" + "maps" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -26,7 +27,6 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "maps" ) // API is a user facing RPC API to allow controlling the signer and voting diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 388c19fbc6..7e8c2bedb1 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -20,6 +20,7 @@ import ( "bytes" "errors" "fmt" + "maps" gomath "math" "math/big" "math/rand" @@ -45,7 +46,6 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/trie" "github.com/holiman/uint256" - "maps" ) // So we can deterministically seed different blockchains diff --git a/core/state/snapshot/difflayer_test.go b/core/state/snapshot/difflayer_test.go index 369e40262a..c26b2079b0 100644 --- a/core/state/snapshot/difflayer_test.go +++ b/core/state/snapshot/difflayer_test.go @@ -19,6 +19,7 @@ package snapshot import ( "bytes" crand "crypto/rand" + "maps" "math/rand" "testing" @@ -26,7 +27,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb/memorydb" - "maps" ) func copyAccounts(accounts map[common.Hash][]byte) map[common.Hash][]byte { diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index c530603930..51172ae62b 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -19,6 +19,7 @@ package txpool import ( "errors" "fmt" + "maps" "math/big" "sync" @@ -29,7 +30,6 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" - "maps" ) // TxStatus is the current status of a transaction as seen by the pool. diff --git a/rpc/client_opt.go b/rpc/client_opt.go index 582d266e9e..4079b51942 100644 --- a/rpc/client_opt.go +++ b/rpc/client_opt.go @@ -17,10 +17,10 @@ package rpc import ( + "maps" "net/http" "github.com/gorilla/websocket" - "maps" ) // ClientOption is a configuration option for the RPC client. diff --git a/rpc/websocket.go b/rpc/websocket.go index 45280516ec..451dddc5f5 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -20,6 +20,7 @@ import ( "context" "encoding/base64" "fmt" + "maps" "net/http" "net/url" "os" @@ -30,7 +31,6 @@ import ( mapset "github.com/deckarep/golang-set/v2" "github.com/ethereum/go-ethereum/log" "github.com/gorilla/websocket" - "maps" ) const (