mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
fix: apply gofmt formatting to all Go files
36 files had minor formatting issues detected by gofmt.
This commit is contained in:
@@ -6,9 +6,9 @@ package consensus
|
||||
import (
|
||||
"context"
|
||||
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/ids"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
)
|
||||
|
||||
// Context keys for consensus-related values
|
||||
|
||||
+1
-1
@@ -42,8 +42,8 @@ import (
|
||||
"github.com/luxfi/geth/core/rawdb"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
"github.com/luxfi/geth/ethdb"
|
||||
log "github.com/luxfi/log"
|
||||
"github.com/luxfi/geth/rlp"
|
||||
log "github.com/luxfi/log"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,11 +6,11 @@ package core
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/evm/params"
|
||||
"github.com/luxfi/evm/precompile/precompileconfig"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -38,8 +38,8 @@ import (
|
||||
|
||||
"github.com/luxfi/geth/core/rawdb"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
log "github.com/luxfi/log"
|
||||
"github.com/luxfi/geth/rlp"
|
||||
log "github.com/luxfi/log"
|
||||
)
|
||||
|
||||
// AdminAPI is the collection of Ethereum full node related APIs for node
|
||||
|
||||
+1
-1
@@ -23,8 +23,8 @@ import (
|
||||
"github.com/luxfi/geth/core/types"
|
||||
|
||||
"github.com/luxfi/consensus/core/choices"
|
||||
block "github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/ids"
|
||||
block "github.com/luxfi/vm/chain"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,11 +6,11 @@ package customrawdb
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/geth/common"
|
||||
ethrawdb "github.com/luxfi/geth/core/rawdb"
|
||||
"github.com/luxfi/geth/ethdb"
|
||||
log "github.com/luxfi/log"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
)
|
||||
|
||||
// ReadSyncRoot reads the root corresponding to the main trie of an in-progress
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
package customrawdb
|
||||
|
||||
import (
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/geth/common"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,8 +6,8 @@ package message
|
||||
import (
|
||||
"github.com/luxfi/codec"
|
||||
"github.com/luxfi/codec/linearcodec"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/crypto"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/vm/chain"
|
||||
)
|
||||
|
||||
// var _ block.StateSummary = (*SyncSummary)(nil)
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
block "github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/database"
|
||||
block "github.com/luxfi/vm/chain"
|
||||
|
||||
"github.com/luxfi/evm/core"
|
||||
"github.com/luxfi/evm/plugin/evm/message"
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
safemath "github.com/luxfi/math/safe"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
safemath "github.com/luxfi/math/safe"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/validators/uptime"
|
||||
stateinterfaces "github.com/luxfi/evm/plugin/evm/validators/state/interfaces"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
)
|
||||
|
||||
type ValidatorReader interface {
|
||||
|
||||
@@ -9,15 +9,15 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/runtime"
|
||||
luxvalidators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/database"
|
||||
validators "github.com/luxfi/evm/plugin/evm/validators/state"
|
||||
stateinterfaces "github.com/luxfi/evm/plugin/evm/validators/state/interfaces"
|
||||
"github.com/luxfi/evm/plugin/evm/validators/uptime"
|
||||
uptimeinterfaces "github.com/luxfi/evm/plugin/evm/validators/uptime/interfaces"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
luxvalidators "github.com/luxfi/validators"
|
||||
|
||||
log "github.com/luxfi/log"
|
||||
)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package interfaces
|
||||
|
||||
import (
|
||||
"github.com/luxfi/validators/uptime"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/math/set"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
)
|
||||
|
||||
type StateReader interface {
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/validators/uptime"
|
||||
luxdb "github.com/luxfi/database"
|
||||
"github.com/luxfi/evm/plugin/evm/validators/state/interfaces"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/math/set"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
)
|
||||
|
||||
var _ uptime.State = (*state)(nil)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package interfaces
|
||||
|
||||
import (
|
||||
"github.com/luxfi/validators/uptime"
|
||||
validatorsstateinterfaces "github.com/luxfi/evm/plugin/evm/validators/state/interfaces"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
)
|
||||
|
||||
type PausableManager interface {
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/validators/uptime"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/math/set"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
)
|
||||
|
||||
// nodeUptime tracks uptime information for a single node
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/validators/uptime"
|
||||
"github.com/luxfi/evm/plugin/evm/validators/uptime/interfaces"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/timer/mockable"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
||||
+7
-7
@@ -83,16 +83,16 @@ import (
|
||||
|
||||
"github.com/luxfi/codec"
|
||||
"github.com/luxfi/consensus/engine/chain/block"
|
||||
"github.com/luxfi/runtime"
|
||||
nodeblock "github.com/luxfi/vm/chain"
|
||||
consensusmockable "github.com/luxfi/consensus/utils/timer/mockable"
|
||||
"github.com/luxfi/database/versiondb"
|
||||
"github.com/luxfi/filesystem/perms"
|
||||
"github.com/luxfi/ids"
|
||||
p2pversion "github.com/luxfi/version"
|
||||
"github.com/luxfi/metric/profiler"
|
||||
"github.com/luxfi/runtime"
|
||||
nodemockable "github.com/luxfi/timer/mockable"
|
||||
"github.com/luxfi/upgrade"
|
||||
"github.com/luxfi/filesystem/perms"
|
||||
"github.com/luxfi/metric/profiler"
|
||||
p2pversion "github.com/luxfi/version"
|
||||
nodeblock "github.com/luxfi/vm/chain"
|
||||
nodeChain "github.com/luxfi/vm/components/chain"
|
||||
|
||||
luxJSON "github.com/luxfi/codec/jsonrpc"
|
||||
@@ -194,8 +194,8 @@ var legacyApiNames = map[string]string{
|
||||
// warp.Signer is used directly from luxfi/warp - no adapters needed.
|
||||
|
||||
type VM struct {
|
||||
ctx context.Context // stdlib context for cancellation
|
||||
runtime *runtime.Runtime // chain wiring (IDs, validators, etc.)
|
||||
ctx context.Context // stdlib context for cancellation
|
||||
runtime *runtime.Runtime // chain wiring (IDs, validators, etc.)
|
||||
// contextLock is used to coordinate global VM operations.
|
||||
// This can be used safely instead of context.Context.Lock which is deprecated and should not be used in rpcchainvm.
|
||||
vmLock sync.RWMutex
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
"github.com/luxfi/constants"
|
||||
luxdatabase "github.com/luxfi/database"
|
||||
"github.com/luxfi/database/factory"
|
||||
@@ -24,6 +23,7 @@ import (
|
||||
"github.com/luxfi/ids"
|
||||
log "github.com/luxfi/log"
|
||||
metrics "github.com/luxfi/metric"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -11,12 +11,12 @@ type VMState = vm.State
|
||||
// Re-export canonical state constants from github.com/luxfi/vm.
|
||||
// One and only one definition — these are aliases, not copies.
|
||||
const (
|
||||
VMUnknown = vm.Unknown // 0
|
||||
VMStarting = vm.Starting // 1
|
||||
VMStateSyncing = vm.Syncing // 2
|
||||
VMUnknown = vm.Unknown // 0
|
||||
VMStarting = vm.Starting // 1
|
||||
VMStateSyncing = vm.Syncing // 2
|
||||
VMBootstrapping = vm.Bootstrapping // 3
|
||||
VMNormalOp = vm.Ready // 4
|
||||
VMDegraded = vm.Degraded // 5
|
||||
VMStopping = vm.Stopping // 6
|
||||
VMStopped = vm.Stopped // 7
|
||||
VMNormalOp = vm.Ready // 4
|
||||
VMDegraded = vm.Degraded // 5
|
||||
VMStopping = vm.Stopping // 6
|
||||
VMStopped = vm.Stopped // 7
|
||||
)
|
||||
|
||||
@@ -6,10 +6,10 @@ package evm
|
||||
import (
|
||||
"context"
|
||||
|
||||
nodeblock "github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/database"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/ids"
|
||||
nodeblock "github.com/luxfi/vm/chain"
|
||||
)
|
||||
|
||||
// warpBlockClient wraps VM to provide the warp.BlockClient interface
|
||||
|
||||
@@ -10,8 +10,6 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/constants"
|
||||
evmconsensus "github.com/luxfi/evm/consensus"
|
||||
"github.com/luxfi/evm/precompile/precompileconfig"
|
||||
@@ -20,6 +18,8 @@ import (
|
||||
"github.com/luxfi/ids"
|
||||
log "github.com/luxfi/log"
|
||||
"github.com/luxfi/math"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/warp"
|
||||
"github.com/luxfi/warp/payload"
|
||||
)
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
"github.com/luxfi/evm/accounts/abi"
|
||||
"github.com/luxfi/evm/precompile/contract"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
"github.com/luxfi/geth/core/vm"
|
||||
"github.com/luxfi/math"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
"github.com/luxfi/warp"
|
||||
"github.com/luxfi/warp/payload"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/evm/core/state"
|
||||
"github.com/luxfi/evm/precompile/contract"
|
||||
"github.com/luxfi/evm/precompile/precompiletest"
|
||||
@@ -18,6 +17,7 @@ import (
|
||||
"github.com/luxfi/geth/core/vm"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/math/set"
|
||||
"github.com/luxfi/runtime"
|
||||
agoUtils "github.com/luxfi/utils"
|
||||
"github.com/luxfi/warp"
|
||||
"github.com/luxfi/warp/payload"
|
||||
|
||||
@@ -9,10 +9,6 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
"github.com/luxfi/vm/chain"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/validators/validatorstest"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/crypto/bls/signer/localsigner"
|
||||
@@ -23,7 +19,11 @@ import (
|
||||
"github.com/luxfi/evm/utils"
|
||||
"github.com/luxfi/evm/utils/utilstest"
|
||||
"github.com/luxfi/ids"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
agoUtils "github.com/luxfi/utils"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/validators/validatorstest"
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/warp"
|
||||
"github.com/luxfi/warp/payload"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -7,9 +7,9 @@ package precompileconfig
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/evm/commontype"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/warp"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ import (
|
||||
|
||||
"github.com/luxfi/codec"
|
||||
"github.com/luxfi/codec/linearcodec"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/evm/plugin/evm/upgrade/feewindow"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -9,12 +9,12 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/holiman/uint256"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/evm/utils/utilstest"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
"github.com/luxfi/geth/trie"
|
||||
"github.com/luxfi/geth/trie/trienode"
|
||||
"github.com/luxfi/geth/triedb"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/geth/ethdb"
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
"github.com/luxfi/evm/plugin/evm/customrawdb"
|
||||
syncclient "github.com/luxfi/evm/sync/client"
|
||||
"github.com/luxfi/evm/utils"
|
||||
@@ -18,7 +19,6 @@ import (
|
||||
"github.com/luxfi/geth/ethdb"
|
||||
"github.com/luxfi/geth/trie"
|
||||
log "github.com/luxfi/log"
|
||||
"github.com/luxfi/codec/wrappers"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/runtime"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/validators/validatorstest"
|
||||
"github.com/luxfi/ids"
|
||||
)
|
||||
|
||||
// EVMTestChainID is a evm specific chain ID for testing
|
||||
|
||||
@@ -23,8 +23,8 @@ import (
|
||||
var (
|
||||
networkID uint32 = 54321
|
||||
sourceChainID = ids.GenerateTestID()
|
||||
testSourceAddress []byte
|
||||
testPayload = []byte("test")
|
||||
testSourceAddress []byte
|
||||
testPayload = []byte("test")
|
||||
testUnsignedMessage *warp.UnsignedMessage
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ package validators
|
||||
import (
|
||||
"context"
|
||||
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
validators "github.com/luxfi/validators"
|
||||
)
|
||||
|
||||
var _ validators.State = (*State)(nil)
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/constants"
|
||||
"github.com/luxfi/ids"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ package validators
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/luxfi/ids"
|
||||
consensuscontext "github.com/luxfi/runtime"
|
||||
validators "github.com/luxfi/validators"
|
||||
"github.com/luxfi/ids"
|
||||
)
|
||||
|
||||
// ConsensusStateWrapper wraps consensuscontext.ValidatorState to implement validators.State
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/consensus/core/choices"
|
||||
"github.com/luxfi/vm/chain"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/vm/chain"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("not found")
|
||||
|
||||
Reference in New Issue
Block a user