Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTei committed Jul 4, 2023
1 parent 406e37b commit 3ac6bf2
Show file tree
Hide file tree
Showing 34 changed files with 64 additions and 42 deletions.
1 change: 1 addition & 0 deletions accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import (
"github.com/ledgerwatch/erigon/params"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/erigon/turbo/stages"
"github.com/ledgerwatch/log/v3"
)

// This nil assignment ensures at compile time that SimulatedBackend implements bind.ContractBackend.
Expand Down
2 changes: 1 addition & 1 deletion cmd/erigon-el/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io/fs"
"log"
"math/big"
"net"
"os"
Expand All @@ -18,6 +17,7 @@ import (
"github.com/c2h5oh/datasize"
"github.com/holiman/uint256"
"github.com/ledgerwatch/erigon/turbo/snapshotsync/snap"
"github.com/ledgerwatch/log/v3"
"golang.org/x/exp/slices"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion cmd/erigon-el/backend/node.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package backend

import (
"github.com/google/martian/log"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon/cmd/utils"
"github.com/ledgerwatch/erigon/eth/ethconfig"
Expand All @@ -10,6 +9,7 @@ import (
"github.com/ledgerwatch/erigon/params"
"github.com/ledgerwatch/erigon/params/networkname"
erigoncli "github.com/ledgerwatch/erigon/turbo/cli"
"github.com/ledgerwatch/log/v3"
)

// ErigonNode represents a single node, that runs sync and p2p network.
Expand Down
1 change: 1 addition & 0 deletions cmd/integration/commands/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/c2h5oh/datasize"
"github.com/ledgerwatch/erigon/core/rawdb/blockio"
"github.com/ledgerwatch/log/v3"
"github.com/ledgerwatch/secp256k1"
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/corner_cases_support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/kv/kvcache"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/require"

"github.com/ledgerwatch/erigon/cmd/rpcdaemon/rpcdaemontest"
Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/ledgerwatch/erigon/rpc"
"github.com/ledgerwatch/erigon/turbo/rpchelper"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/log/v3"
)

// APIList describes the list of available RPC apis
Expand Down
1 change: 0 additions & 1 deletion cmd/rpcdaemon/commands/debug_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package commands
import (
"bytes"
"encoding/json"
"log"
"reflect"
"testing"

Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/eth_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/ledgerwatch/erigon-lib/kv/kvcfg"
libstate "github.com/ledgerwatch/erigon-lib/state"
types2 "github.com/ledgerwatch/erigon-lib/types"
"github.com/ledgerwatch/log/v3"

"github.com/ledgerwatch/erigon/common/hexutil"
"github.com/ledgerwatch/erigon/common/math"
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/eth_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package commands
import (
"context"
"fmt"
"log"
"testing"

"github.com/holiman/uint256"
"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/assert"

"github.com/ledgerwatch/erigon-lib/kv/kvcache"
Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/eth_block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/gointerfaces/txpool"
"github.com/ledgerwatch/erigon-lib/kv/kvcache"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/assert"

"github.com/ledgerwatch/erigon/cmd/rpcdaemon/rpcdaemontest"
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/eth_callMany_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/hex"
"fmt"
"log"
"math/big"
"strconv"
"testing"
Expand All @@ -23,6 +22,7 @@ import (
"github.com/ledgerwatch/erigon/rpc"
"github.com/ledgerwatch/erigon/rpc/rpccfg"
"github.com/ledgerwatch/erigon/turbo/adapter/ethapi"
"github.com/ledgerwatch/log/v3"
)

// block 1 contains 3 Transactions
Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/eth_call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/holiman/uint256"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/eth_filters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/ledgerwatch/erigon/eth/filters"
"github.com/ledgerwatch/erigon/turbo/rpchelper"
"github.com/ledgerwatch/erigon/turbo/stages"
"github.com/ledgerwatch/log/v3"
)

func TestNewFilters(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/eth_mining_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package commands

import (
"log"
"math/big"
"testing"
"time"
Expand All @@ -16,6 +15,7 @@ import (
"github.com/ledgerwatch/erigon/rlp"
"github.com/ledgerwatch/erigon/turbo/rpchelper"
"github.com/ledgerwatch/erigon/turbo/stages"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/require"
)

Expand Down
1 change: 1 addition & 0 deletions cmd/rpcdaemon/commands/eth_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/ledgerwatch/erigon/turbo/rpchelper"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/erigon/turbo/transactions"
"github.com/ledgerwatch/log/v3"
)

func (api *BaseAPI) getReceipts(ctx context.Context, tx kv.Tx, chainConfig *chain.Config, block *types.Block, senders []common.Address) (types.Receipts, error) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/eth_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package commands

import (
"context"
"log"
"math"
"math/big"
"testing"
Expand All @@ -11,6 +10,7 @@ import (
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/kv/kvcache"
"github.com/ledgerwatch/erigon/rpc/rpccfg"
"github.com/ledgerwatch/log/v3"

"github.com/ledgerwatch/erigon/core"
"github.com/ledgerwatch/erigon/core/types"
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/otterscan_search_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package commands
import (
"context"
"fmt"
"github.com/google/martian/log"
"sync"

"github.com/ledgerwatch/erigon-lib/chain"
Expand All @@ -16,6 +15,7 @@ import (
"github.com/ledgerwatch/erigon/core/vm"
"github.com/ledgerwatch/erigon/turbo/rpchelper"
"github.com/ledgerwatch/erigon/turbo/shards"
"github.com/ledgerwatch/log/v3"
)

func (api *OtterscanAPIImpl) searchTraceBlock(ctx, traceCtx context.Context, traceCtxCancel context.CancelFunc, wg *sync.WaitGroup, errCh chan<- error, addr common.Address, chainConfig *chain.Config, idx int, bNum uint64, results []*TransactionsWithReceipts) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/commands/send_transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package commands_test
import (
"bytes"
"crypto/ecdsa"
"log"
"math/big"
"testing"

Expand All @@ -12,6 +11,7 @@ import (
"github.com/ledgerwatch/erigon-lib/gointerfaces/sentry"
"github.com/ledgerwatch/erigon-lib/gointerfaces/txpool"
"github.com/ledgerwatch/erigon-lib/kv/kvcache"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/require"

"github.com/ledgerwatch/erigon/cmd/rpcdaemon/commands"
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"github.com/google/martian/log"
"os"
"time"

Expand All @@ -13,6 +12,7 @@ import (
"github.com/ledgerwatch/erigon/consensus/ethash"
"github.com/ledgerwatch/erigon/rpc"
"github.com/ledgerwatch/erigon/turbo/debug"
"github.com/ledgerwatch/log/v3"
"github.com/spf13/cobra"
)

Expand Down
9 changes: 4 additions & 5 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"crypto/ecdsa"
"encoding/json"
"fmt"
"github.com/urfave/cli/v2"
"math/big"
"os"
"path/filepath"
Expand All @@ -31,11 +32,6 @@ import (
"golang.org/x/exp/slices"

"github.com/c2h5oh/datasize"
"github.com/ledgerwatch/log/v3"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/urfave/cli/v2"

libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/common/cmp"
"github.com/ledgerwatch/erigon-lib/common/datadir"
Expand All @@ -44,6 +40,9 @@ import (
downloadercfg2 "github.com/ledgerwatch/erigon-lib/downloader/downloadercfg"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon-lib/txpool/txpoolcfg"
"github.com/ledgerwatch/log/v3"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/ledgerwatch/erigon/cl/clparams"
"github.com/ledgerwatch/erigon/cmd/downloader/downloadernat"
Expand Down
1 change: 1 addition & 0 deletions core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/ledgerwatch/erigon/ethdb/cbor"
"github.com/ledgerwatch/erigon/rlp"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/log/v3"
)

// ReadCanonicalHash retrieves the hash assigned to a canonical block number.
Expand Down
1 change: 1 addition & 0 deletions core/rawdb/accessors_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/ledgerwatch/erigon-lib/kv/memdb"
"github.com/ledgerwatch/erigon/core/rawdb"
"github.com/ledgerwatch/erigon/turbo/stages"
"github.com/ledgerwatch/log/v3"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/sha3"

Expand Down
8 changes: 8 additions & 0 deletions core/types/deposit_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func (tx DepositTx) GetTo() *libcommon.Address {
return tx.To
}

func (ct DepositTx) GetDataGas() uint64 {
return 0
}

func (tx DepositTx) GetGas() uint64 {
return tx.Gas
}
Expand Down Expand Up @@ -475,3 +479,7 @@ func (tx *DepositTx) GetDataHashes() []libcommon.Hash {
// Only blob txs have data hashes
return []libcommon.Hash{}
}

func (tx *DepositTx) Unwrap() Transaction {
return tx
}
2 changes: 1 addition & 1 deletion core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"container/heap"
"errors"
"fmt"
"github.com/google/martian/log"
"io"
"math/big"
"sync/atomic"
Expand All @@ -31,6 +30,7 @@ import (
"github.com/ledgerwatch/erigon-lib/chain"
libcommon "github.com/ledgerwatch/erigon-lib/common"
types2 "github.com/ledgerwatch/erigon-lib/types"
"github.com/ledgerwatch/log/v3"
"github.com/protolambda/ztyp/codec"

"github.com/ledgerwatch/erigon/common"
Expand Down
6 changes: 3 additions & 3 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"context"
"errors"
"fmt"
"github.com/google/martian/log"
"io/fs"
"math/big"
"net"
Expand All @@ -41,6 +40,7 @@ import (
"github.com/ledgerwatch/erigon/turbo/snapshotsync/snap"

"github.com/holiman/uint256"
"github.com/ledgerwatch/log/v3"
"golang.org/x/exp/slices"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down Expand Up @@ -495,7 +495,7 @@ func New(stack *node.Node, config *ethconfig.Config, logger log.Logger) (*Ethere
// Setup sequencer and hsistorical RPC relay services
if config.RollupSequencerHTTP != "" {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
client, err := rpc.DialContext(ctx, config.RollupSequencerHTTP)
client, err := rpc.DialContext(ctx, config.RollupSequencerHTTP, logger)
cancel()
if err != nil {
return nil, err
Expand All @@ -504,7 +504,7 @@ func New(stack *node.Node, config *ethconfig.Config, logger log.Logger) (*Ethere
}
if config.RollupHistoricalRPC != "" {
ctx, cancel := context.WithTimeout(context.Background(), config.RollupHistoricalRPCTimeout)
client, err := rpc.DialContext(ctx, config.RollupHistoricalRPC)
client, err := rpc.DialContext(ctx, config.RollupHistoricalRPC, logger)
cancel()
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions eth/protocols/eth/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/rlp"
"github.com/ledgerwatch/erigon/turbo/services"
"github.com/ledgerwatch/log/v3"
)

func AnswerGetBlockHeadersQuery(db kv.Tx, query *GetBlockHeadersPacket, blockReader services.HeaderAndCanonicalReader) ([]*types.Header, error) {
Expand Down
Loading

0 comments on commit 3ac6bf2

Please sign in to comment.