Skip to content

Commit

Permalink
Merge pull request ethereum#230 from OffchainLabs/enable-lint-ci
Browse files Browse the repository at this point in the history
Add lint CI job
  • Loading branch information
Tristan-Wilson authored Aug 9, 2023
2 parents 2ff9bcd + 13a226a commit d6778f2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 34 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ jobs:

- name: Test
run: make test

run-linter:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Test
run: make lint
21 changes: 0 additions & 21 deletions core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,6 @@ type arbLegacyStoredReceiptRLP struct {
Logs []*Log
}

// v4StoredReceiptRLP is the storage encoding of a receipt used in database version 4.
type v4StoredReceiptRLP struct {
PostStateOrStatus []byte
CumulativeGasUsed uint64
TxHash common.Hash
ContractAddress common.Address
Logs []*Log
GasUsed uint64
}

// v3StoredReceiptRLP is the original storage encoding of a receipt including some unnecessary fields.
type v3StoredReceiptRLP struct {
PostStateOrStatus []byte
CumulativeGasUsed uint64
Bloom Bloom
TxHash common.Hash
ContractAddress common.Address
Logs []*Log
GasUsed uint64
}

// NewReceipt creates a barebone transaction receipt, copying the init fields.
// Deprecated: create receipts using a struct literal instead.
func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt {
Expand Down
2 changes: 1 addition & 1 deletion core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {
enc.To = tx.To()
case *ArbitrumContractTx:
enc.RequestId = &itx.RequestId
enc.From = (*common.Address)(&itx.From)
enc.From = &itx.From
enc.ChainID = (*hexutil.Big)(itx.ChainId)
enc.Gas = (*hexutil.Uint64)(&itx.Gas)
enc.MaxFeePerGas = (*hexutil.Big)(itx.GasFeeCap)
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/native/call_flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type flatCallResultMarshaling struct {
// flatCallTracer reports call frame information of a tx in a flat format, i.e.
// as opposed to the nested format of `callTracer`.
type flatCallTracer struct {
// Arbitrum: capture transfers occuring outside of evm execution
// Arbitrum: capture transfers occurring outside of evm execution
beforeEVMTransfers []arbitrumTransfer
afterEVMTransfers []arbitrumTransfer

Expand Down
10 changes: 0 additions & 10 deletions eth/tracers/native/tracer_arbitrum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ package native

import (
"math/big"
"strconv"
"strings"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
Expand Down Expand Up @@ -98,11 +96,3 @@ func bigToHex(n *big.Int) string {
}
return "0x" + n.Text(16)
}

func uintToHex(n uint64) string {
return "0x" + strconv.FormatUint(n, 16)
}

func addrToHex(a common.Address) string {
return strings.ToLower(a.Hex())
}
1 change: 0 additions & 1 deletion rpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ func (h *handler) handleBatch(msgs []*jsonrpcMessage) {
if err != nil {
h.conn.writeJSON(cp.ctx, errorMessage(err), true)
return

}
}
if timer != nil {
Expand Down

0 comments on commit d6778f2

Please sign in to comment.