mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
fix: gofmt -s across repo (CI format check)
This commit is contained in:
+1
-1
@@ -10,10 +10,10 @@ import (
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"github.com/luxfi/filesystem/perms"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/node/node"
|
||||
"github.com/luxfi/node/utils"
|
||||
"github.com/luxfi/filesystem/perms"
|
||||
"github.com/luxfi/sys/ulimit"
|
||||
|
||||
nodeconfig "github.com/luxfi/node/config/node"
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
metrics "github.com/luxfi/metric"
|
||||
validators "github.com/luxfi/validators"
|
||||
)
|
||||
|
||||
// NewManager creates a new benchlist manager
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/crypto/hash"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/crypto/hash"
|
||||
)
|
||||
|
||||
// BenchmarkHashingComputeHash256 benchmarks SHA256 hashing performance
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/crypto/hash"
|
||||
"github.com/luxfi/database/memdb"
|
||||
"github.com/luxfi/database/prefixdb"
|
||||
"github.com/luxfi/database/versiondb"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/crypto/hash"
|
||||
)
|
||||
|
||||
// BenchmarkMemoryDatabase benchmarks in-memory database operations
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"encoding/binary"
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/ids"
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/ids"
|
||||
)
|
||||
|
||||
// BenchmarkMessageCompression benchmarks message compression
|
||||
|
||||
Vendored
+1
-1
@@ -6,9 +6,9 @@ package lru
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/container/linked"
|
||||
"github.com/luxfi/node/cache"
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/container/linked"
|
||||
)
|
||||
|
||||
var _ cache.Cacher[struct{}, struct{}] = (*Cache[struct{}, struct{}])(nil)
|
||||
|
||||
Vendored
+1
-1
@@ -6,9 +6,9 @@ package lru
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/container/linked"
|
||||
"github.com/luxfi/node/cache"
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/container/linked"
|
||||
)
|
||||
|
||||
var _ cache.Cacher[struct{}, any] = (*SizedCache[struct{}, any])(nil)
|
||||
|
||||
Vendored
+1
-1
@@ -6,8 +6,8 @@ package cache
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/container/linked"
|
||||
"github.com/luxfi/utils"
|
||||
)
|
||||
|
||||
var _ Cacher[struct{}, struct{}] = (*LRU[struct{}, struct{}])(nil)
|
||||
|
||||
Vendored
+1
-1
@@ -6,8 +6,8 @@ package cache
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/container/linked"
|
||||
"github.com/luxfi/utils"
|
||||
)
|
||||
|
||||
var _ Cacher[struct{}, any] = (*sizedLRU[struct{}, any])(nil)
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/vm/chain"
|
||||
consensusvertex "github.com/luxfi/consensus/engine/vertex"
|
||||
"github.com/luxfi/database"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/vms/platformvm/fx"
|
||||
"github.com/luxfi/runtime"
|
||||
vmcore "github.com/luxfi/vm"
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/warp"
|
||||
)
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/luxfi/vm"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/metric"
|
||||
"github.com/luxfi/node/nets"
|
||||
"github.com/luxfi/node/vms"
|
||||
"github.com/luxfi/vm"
|
||||
)
|
||||
|
||||
// TestNew tests creating a new manager
|
||||
|
||||
@@ -1746,7 +1746,6 @@ func GetNodeConfig(v *viper.Viper) (node.Config, error) {
|
||||
}
|
||||
nodeConfig.TrackAllChains = v.GetBool(TrackAllChainsKey)
|
||||
|
||||
|
||||
// HTTP APIs
|
||||
nodeConfig.HTTPConfig, err = getHTTPConfig(v)
|
||||
if err != nil {
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/luxfi/constants"
|
||||
consensusconfig "github.com/luxfi/consensus/config"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/chains"
|
||||
"github.com/luxfi/node/genesis/builder"
|
||||
|
||||
+2
-2
@@ -13,14 +13,14 @@ import (
|
||||
"github.com/spf13/pflag"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/genesis/pkg/genesis"
|
||||
"github.com/luxfi/net/dynamicip"
|
||||
"github.com/luxfi/node/genesis/builder"
|
||||
"github.com/luxfi/node/trace"
|
||||
"github.com/luxfi/node/vms/components/gas"
|
||||
"github.com/luxfi/node/vms/proposervm"
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/net/dynamicip"
|
||||
"github.com/luxfi/sys/ulimit"
|
||||
|
||||
consensusconfig "github.com/luxfi/consensus/config"
|
||||
|
||||
@@ -10,23 +10,23 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/server/http"
|
||||
"github.com/luxfi/node/benchlist"
|
||||
"github.com/luxfi/node/chains"
|
||||
"github.com/luxfi/node/genesis/builder"
|
||||
"github.com/luxfi/node/network"
|
||||
"github.com/luxfi/node/server/http"
|
||||
// "github.com/luxfi/consensus/core/router" // Unused
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/crypto/mldsa"
|
||||
mlkemcrypto "github.com/luxfi/crypto/mlkem"
|
||||
"github.com/luxfi/node/nets"
|
||||
"github.com/luxfi/node/network/tracker"
|
||||
"github.com/luxfi/node/upgrade"
|
||||
"github.com/luxfi/node/trace"
|
||||
"github.com/luxfi/node/upgrade"
|
||||
// "github.com/luxfi/log" // Unused
|
||||
"github.com/luxfi/math/set"
|
||||
"github.com/luxfi/timer"
|
||||
"github.com/luxfi/node/utils/profiler"
|
||||
"github.com/luxfi/timer"
|
||||
)
|
||||
|
||||
type APIIndexerConfig struct {
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+1
-1
@@ -7,9 +7,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/consensus/utils/set"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
validators "github.com/luxfi/validators"
|
||||
)
|
||||
|
||||
func TestFullValidatorFunctionality(t *testing.T) {
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package debug
|
||||
|
||||
import (
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
validators "github.com/luxfi/validators"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ import (
|
||||
"github.com/luxfi/net/endpoints"
|
||||
"github.com/luxfi/node/vms/components/gas"
|
||||
"github.com/luxfi/node/vms/platformvm/genesis"
|
||||
xvmgenesis "github.com/luxfi/node/vms/xvm/genesis"
|
||||
"github.com/luxfi/node/vms/platformvm/reward"
|
||||
"github.com/luxfi/node/vms/platformvm/signer"
|
||||
pchaintxs "github.com/luxfi/node/vms/platformvm/txs"
|
||||
"github.com/luxfi/node/vms/platformvm/validators/fee"
|
||||
xvmgenesis "github.com/luxfi/node/vms/xvm/genesis"
|
||||
"github.com/luxfi/utxo/bls12381fx"
|
||||
"github.com/luxfi/utxo/ed25519fx"
|
||||
"github.com/luxfi/utxo/mldsafx"
|
||||
@@ -38,8 +38,8 @@ import (
|
||||
"github.com/luxfi/utxo/secp256r1fx"
|
||||
"github.com/luxfi/utxo/slhdsafx"
|
||||
|
||||
genesiscfg "github.com/luxfi/genesis/pkg/genesis"
|
||||
genesisconfigs "github.com/luxfi/genesis/configs"
|
||||
genesiscfg "github.com/luxfi/genesis/pkg/genesis"
|
||||
)
|
||||
|
||||
// Chain alias vars are derived from the single source of truth (Registry
|
||||
|
||||
@@ -126,4 +126,3 @@ func VMAliasesMap() map[ids.ID][]string {
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/luxfi/formatting"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/rpc"
|
||||
"github.com/luxfi/node/utils/json"
|
||||
"github.com/luxfi/rpc"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/luxfi/formatting"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/utils/json"
|
||||
"github.com/luxfi/rpc"
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/node/utils/json"
|
||||
)
|
||||
|
||||
type mockClient struct {
|
||||
|
||||
+1
-1
@@ -8,13 +8,13 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/database"
|
||||
"github.com/luxfi/database/prefixdb"
|
||||
"github.com/luxfi/database/versiondb"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
nodeconsensus "github.com/luxfi/node/consensus"
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -15,9 +15,9 @@ import (
|
||||
"github.com/luxfi/database/prefixdb"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/node/server/http"
|
||||
"github.com/luxfi/node/chains"
|
||||
nodeconsensus "github.com/luxfi/node/consensus"
|
||||
"github.com/luxfi/node/server/http"
|
||||
"github.com/luxfi/node/utils/json"
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
|
||||
+1
-1
@@ -6,8 +6,8 @@ package message
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/metric"
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/metric"
|
||||
)
|
||||
|
||||
var _ Creator = (*creator)(nil)
|
||||
|
||||
@@ -10,10 +10,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/proto/p2p"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
compression "github.com/luxfi/compress"
|
||||
)
|
||||
|
||||
func Test_newMsgBuilder(t *testing.T) {
|
||||
|
||||
@@ -15,9 +15,9 @@ import (
|
||||
time "time"
|
||||
|
||||
ids "github.com/luxfi/ids"
|
||||
"github.com/luxfi/net/endpoints"
|
||||
message "github.com/luxfi/node/message"
|
||||
p2p "github.com/luxfi/node/proto/p2p"
|
||||
"github.com/luxfi/net/endpoints"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -8,12 +8,12 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/metric"
|
||||
"github.com/luxfi/node/proto/p2p"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
compression "github.com/luxfi/compress"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -12,9 +12,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/proto/p2p"
|
||||
compression "github.com/luxfi/compress"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -12,10 +12,10 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
compression "github.com/luxfi/compress"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/proto/p2p"
|
||||
"github.com/luxfi/node/staking"
|
||||
compression "github.com/luxfi/compress"
|
||||
)
|
||||
|
||||
func TestMessage(t *testing.T) {
|
||||
|
||||
@@ -17,8 +17,8 @@ import (
|
||||
time "time"
|
||||
|
||||
ids "github.com/luxfi/ids"
|
||||
p2p "github.com/luxfi/node/proto/p2p"
|
||||
"github.com/luxfi/net/endpoints"
|
||||
p2p "github.com/luxfi/node/proto/p2p"
|
||||
)
|
||||
|
||||
// MockOutboundMsgBuilder is a mock of OutboundMsgBuilder interface.
|
||||
|
||||
@@ -41,7 +41,6 @@ const (
|
||||
var (
|
||||
ErrInvalidMessage = errors.New("invalid wire message")
|
||||
ErrUnknownTag = errors.New("unknown message tag")
|
||||
|
||||
)
|
||||
|
||||
// Buffer for zero-copy encoding
|
||||
|
||||
Reference in New Issue
Block a user