@@ -152,9 +152,9 @@ func (q *queue) add(hash common.Hash, tx *types.Transaction) (*common.Hash, erro
152
152
// Returns two lists: all transactions that were removed from the queue and selected
153
153
// for promotion; all other transactions that were removed from the queue and dropped.
154
154
func (q * queue ) promoteExecutables (accounts []common.Address , gasLimit uint64 , currentState * state.StateDB , nonces * noncer ) ([]* types.Transaction , []common.Hash ) {
155
- // Track the promoteable transactions to broadcast them at once
156
- var promoteable []* types.Transaction
157
- var removeable []common.Hash
155
+ // Track the promotable transactions to broadcast them at once
156
+ var promotable []* types.Transaction
157
+ var dropped []common.Hash
158
158
159
159
// Iterate over all accounts and promote any executable transactions
160
160
for _ , addr := range accounts {
@@ -165,40 +165,40 @@ func (q *queue) promoteExecutables(accounts []common.Address, gasLimit uint64, c
165
165
// Drop all transactions that are deemed too old (low nonce)
166
166
forwards := list .Forward (currentState .GetNonce (addr ))
167
167
for _ , tx := range forwards {
168
- removeable = append (removeable , tx .Hash ())
168
+ dropped = append (dropped , tx .Hash ())
169
169
}
170
170
log .Trace ("Removing old queued transactions" , "count" , len (forwards ))
171
171
// Drop all transactions that are too costly (low balance or out of gas)
172
172
drops , _ := list .Filter (currentState .GetBalance (addr ), gasLimit )
173
173
for _ , tx := range drops {
174
- removeable = append (removeable , tx .Hash ())
174
+ dropped = append (dropped , tx .Hash ())
175
175
}
176
176
log .Trace ("Removing unpayable queued transactions" , "count" , len (drops ))
177
177
queuedNofundsMeter .Mark (int64 (len (drops )))
178
178
179
179
// Gather all executable transactions and promote them
180
180
readies := list .Ready (nonces .get (addr ))
181
- promoteable = append (promoteable , readies ... )
182
- log .Trace ("Promoting queued transactions" , "count" , len (promoteable ))
181
+ promotable = append (promotable , readies ... )
182
+ log .Trace ("Promoting queued transactions" , "count" , len (promotable ))
183
183
queuedGauge .Dec (int64 (len (readies )))
184
184
185
185
// Drop all transactions over the allowed limit
186
186
var caps = list .Cap (int (q .config .AccountQueue ))
187
187
for _ , tx := range caps {
188
188
hash := tx .Hash ()
189
- removeable = append (removeable , hash )
189
+ dropped = append (dropped , hash )
190
190
log .Trace ("Removing cap-exceeding queued transaction" , "hash" , hash )
191
191
}
192
192
queuedRateLimitMeter .Mark (int64 (len (caps )))
193
- queuedGauge .Dec (int64 (len (removeable )))
193
+ queuedGauge .Dec (int64 (len (dropped )))
194
194
195
195
// Delete the entire queue entry if it became empty.
196
196
if list .Empty () {
197
197
delete (q .queued , addr )
198
198
delete (q .beats , addr )
199
199
}
200
200
}
201
- return promoteable , removeable
201
+ return promotable , dropped
202
202
}
203
203
204
204
func (q * queue ) truncate () []common.Hash {
0 commit comments