@@ -1957,9 +1957,9 @@ func numSlots(tx *types.Transaction) int {
1957
1957
1958
1958
// Clear implements txpool.SubPool, removing all tracked txs from the pool
1959
1959
// 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 ()
1963
1963
1964
1964
// unreserve each tracked account. Ideally, we could just clear the
1965
1965
// reservation map in the parent txpool context. However, if we clear in
@@ -1975,22 +1975,22 @@ func (p *LegacyPool) Clear() {
1975
1975
// The transaction addition may attempt to reserve the sender addr which
1976
1976
// can't happen until Clear releases the reservation lock. Clear cannot
1977
1977
// 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 )
1981
1981
}
1982
- for localSender , _ := range p .locals .accounts {
1983
- p .reserve (localSender , false )
1982
+ for localSender , _ := range pool .locals .accounts {
1983
+ pool .reserve (localSender , false )
1984
1984
}
1985
1985
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 )
1990
1990
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 {
1994
1994
log .Warn ("Failed to rotate transaction journal" , "err" , err )
1995
1995
}
1996
1996
}
0 commit comments