@@ -9,10 +9,7 @@ import (
9
9
"github.com/ethereum/go-ethereum/core/types"
10
10
"github.com/ethereum/go-ethereum/log"
11
11
"github.com/holiman/uint256"
12
- "github.com/pborman/uuid"
13
12
"modernc.org/mathutil"
14
-
15
- "github.com/taikoxyz/taiko-client/pkg/rpc"
16
13
)
17
14
18
15
// adjustGas adjusts the gas fee cap and gas tip cap of the given transaction with the configured
@@ -132,51 +129,6 @@ func (s *Sender) buildTxData(tx *types.Transaction) (types.TxData, error) {
132
129
}
133
130
}
134
131
135
- // handleReorgTransactions handles the transactions which are backed to the mempool due to reorg.
136
- func (s * Sender ) handleReorgTransactions () { // nolint: unused
137
- content , err := rpc .Content (s .ctx , s .client )
138
- if err != nil {
139
- log .Warn ("failed to get the unconfirmed transactions" , "address" , s .Opts .From .String (), "err" , err )
140
- return
141
- }
142
- if len (content ) == 0 {
143
- return
144
- }
145
-
146
- txs := map [common.Hash ]* types.Transaction {}
147
- for _ , txMapStatus := range content {
148
- for key , txMapNonce := range txMapStatus {
149
- addr := common .HexToAddress (key )
150
- if addr != s .Opts .From {
151
- continue
152
- }
153
- for _ , tx := range txMapNonce {
154
- txs [tx .Hash ()] = tx
155
- }
156
- }
157
- }
158
- // Remove the already handled transactions.
159
- for _ , confirm := range s .unconfirmedTxs .Items () {
160
- delete (txs , confirm .CurrentTx .Hash ())
161
- }
162
- for _ , tx := range txs {
163
- baseTx , err := s .buildTxData (tx )
164
- if err != nil {
165
- log .Warn ("failed to make the transaction data when handle reorg txs" , "tx_hash" , tx .Hash ().String (), "err" , err )
166
- return
167
- }
168
- txID := uuid .New ()
169
- confirm := & TxToConfirm {
170
- ID : txID ,
171
- CurrentTx : tx ,
172
- originalTx : baseTx ,
173
- }
174
- s .unconfirmedTxs .Set (txID , confirm )
175
- s .txToConfirmCh .Set (txID , make (chan * TxToConfirm , 1 ))
176
- log .Info ("handle reorg tx" , "tx_hash" , tx .Hash ().String (), "tx_id" , txID )
177
- }
178
- }
179
-
180
132
// setDefault sets the default value if the given value is 0.
181
133
func setDefault [T uint64 | time.Duration ](src , dest T ) T {
182
134
if src == 0 {
0 commit comments