Skip to content

Commit 0bc3138

Browse files
committed
core/txpool/legacypool: change receiver name
1 parent a67a0b4 commit 0bc3138

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

core/txpool/legacypool/legacypool.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,9 +1957,9 @@ func numSlots(tx *types.Transaction) int {
19571957

19581958
// Clear implements txpool.SubPool, removing all tracked txs from the pool
19591959
// and rotating the journal.
1960-
func (p *LegacyPool) Clear() {
1961-
p.mu.Lock()
1962-
defer p.mu.Unlock()
1960+
func (pool *LegacyPool) Clear() {
1961+
pool.mu.Lock()
1962+
defer pool.mu.Unlock()
19631963

19641964
// unreserve each tracked account. Ideally, we could just clear the
19651965
// reservation map in the parent txpool context. However, if we clear in
@@ -1975,22 +1975,22 @@ func (p *LegacyPool) Clear() {
19751975
// The transaction addition may attempt to reserve the sender addr which
19761976
// can't happen until Clear releases the reservation lock. Clear cannot
19771977
// acquire the subpool lock until the transaction addition is completed.
1978-
for _, tx := range p.all.remotes {
1979-
senderAddr, _ := types.Sender(p.signer, tx)
1980-
p.reserve(senderAddr, false)
1978+
for _, tx := range pool.all.remotes {
1979+
senderAddr, _ := types.Sender(pool.signer, tx)
1980+
pool.reserve(senderAddr, false)
19811981
}
1982-
for localSender, _ := range p.locals.accounts {
1983-
p.reserve(localSender, false)
1982+
for localSender, _ := range pool.locals.accounts {
1983+
pool.reserve(localSender, false)
19841984
}
19851985

1986-
p.all = newLookup()
1987-
p.priced = newPricedList(p.all)
1988-
p.pending = make(map[common.Address]*list)
1989-
p.queue = make(map[common.Address]*list)
1986+
pool.all = newLookup()
1987+
pool.priced = newPricedList(pool.all)
1988+
pool.pending = make(map[common.Address]*list)
1989+
pool.queue = make(map[common.Address]*list)
19901990

1991-
if !p.config.NoLocals && p.config.Journal != "" {
1992-
p.journal = newTxJournal(p.config.Journal)
1993-
if err := p.journal.rotate(p.local()); err != nil {
1991+
if !pool.config.NoLocals && pool.config.Journal != "" {
1992+
pool.journal = newTxJournal(pool.config.Journal)
1993+
if err := pool.journal.rotate(pool.local()); err != nil {
19941994
log.Warn("Failed to rotate transaction journal", "err", err)
19951995
}
19961996
}

0 commit comments

Comments
 (0)