We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d2e3b6 commit 58c34e1Copy full SHA for 58c34e1
core/types/transaction.go
@@ -339,11 +339,14 @@ type TransactionsByPriceAndNonce struct {
339
func NewTransactionsByPriceAndNonce(signer Signer, txs map[common.Address]Transactions) *TransactionsByPriceAndNonce {
340
// Initialize a price based heap with the head transactions
341
heads := make(TxByPrice, 0, len(txs))
342
- for _, accTxs := range txs {
+ for from, accTxs := range txs {
343
heads = append(heads, accTxs[0])
344
// Ensure the sender address is from the signer
345
acc, _ := Sender(signer, accTxs[0])
346
txs[acc] = accTxs[1:]
347
+ if from != acc {
348
+ delete(txs, from)
349
+ }
350
}
351
heap.Init(&heads)
352
0 commit comments