HomeSource World

core: avoid modification of accountSet cache in tx_pool (#21159)

Description

core: avoid modification of accountSet cache in tx_pool (#21159)

  • core: avoid modification of accountSet cache in tx_pool

when runReorg, we may copy the dirtyAccounts' accountSet cache to promoteAddrs
in which accounts will be promoted, however, if we have reset request at the
same time, we may reuse promoteAddrs and modify the cache content which is
against the original intention of accountSet cache. So, we need to make a new
slice here to avoid modify accountSet cache.

  • core: fix flatten condition + comment

Co-authored-by: Felix Lange <fjl@twurst.com>

Details

Provenance
Hao Duan <duanhao0814@gmail.com>Authored on Aug 4 2020, 9:51 AM
GitHub <noreply@github.com>Committed on Aug 4 2020, 9:51 AM
Parents
rGETHe24e05dd0140: cmd/devp2p: print enode:// URL in enrdump (#21270)
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGETHb35e4fce9946: core: avoid modification of accountSet cache in tx_pool (#21159) (authored by Hao Duan <duanhao0814@gmail.com>).Aug 4 2020, 9:51 AM