Skip to content

Commit 03f614f

Browse files
chore(core): revert []*ethapi.RPCTransaction changes in miner (#394)
This reverts commit afd09af.
1 parent 573f8fc commit 03f614f

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

miner/taiko_miner.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import (
66
"github.com/ethereum/go-ethereum/beacon/engine"
77
"github.com/ethereum/go-ethereum/common"
88
"github.com/ethereum/go-ethereum/core/types"
9-
"github.com/ethereum/go-ethereum/internal/ethapi"
109
)
1110

1211
// PreBuiltTxList is a pre-built transaction list based on the latest chain state,
1312
// with estimated gas used / bytes.
1413
type PreBuiltTxList struct {
15-
TxList []*ethapi.RPCTransaction
14+
TxList types.Transactions
1615
EstimatedGasUsed uint64
1716
BytesLength uint64
1817
}

miner/taiko_worker.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/ethereum/go-ethereum/core/txpool"
1616
"github.com/ethereum/go-ethereum/core/types"
1717
"github.com/ethereum/go-ethereum/core/vm"
18-
"github.com/ethereum/go-ethereum/internal/ethapi"
1918
"github.com/ethereum/go-ethereum/log"
2019
"github.com/ethereum/go-ethereum/params"
2120
"github.com/ethereum/go-ethereum/rlp"
@@ -94,7 +93,7 @@ func (w *Miner) buildTransactionsLists(
9493
}
9594

9695
return lastTransaction, &PreBuiltTxList{
97-
TxList: w.toRPCTransactions(env.txs),
96+
TxList: env.txs,
9897
EstimatedGasUsed: env.header.GasLimit - env.gasPool.Gas(),
9998
BytesLength: uint64(len(b)),
10099
}, nil
@@ -339,15 +338,6 @@ loop:
339338
return lastTransaction
340339
}
341340

342-
// toRPCTransactions converts the given transactions to RPC transactions.
343-
func (w *Miner) toRPCTransactions(txs types.Transactions) []*ethapi.RPCTransaction {
344-
var rpcTxs []*ethapi.RPCTransaction
345-
for _, tx := range txs {
346-
rpcTxs = append(rpcTxs, ethapi.NewRPCPendingTransaction(tx, nil, w.chainConfig))
347-
}
348-
return rpcTxs
349-
}
350-
351341
// encodeAndCompressTxList encodes and compresses the given transactions list.
352342
func encodeAndCompressTxList(txs types.Transactions) ([]byte, error) {
353343
b, err := rlp.EncodeToBytes(txs)

0 commit comments

Comments
 (0)