builder icon indicating copy to clipboard operation
builder copied to clipboard

Does AddMevBundle need to use global pool mutex ?

Open dmarzzz opened this issue 2 years ago • 2 comments

AddMevBundle surely needs to lock for atomicity of adding to the bundle pool (pool.mevBundles), but as far as I can tell it doesn't interact with the rest of the txpool so should be okay to use something like pool.bundleMu.Lock()? Happy to implement if so 😃

dmarzzz avatar Nov 22 '22 15:11 dmarzzz

I think it's a good idea! Keep in mind pool.bundleFetcher is also accessed, but it can also be covered by the bundles-specific lock.

Ruteri avatar Nov 22 '22 16:11 Ruteri

awesome ty for heads up! will try and get a PR out this coming week

dmarzzz avatar Nov 26 '22 22:11 dmarzzz