ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

DevP2P debug strings optimization

Open jochem-brouwer opened this issue 2 years ago • 1 comments

In devp2p at least in eth and les we always generate a debug string even if we are not in debug mode, e.g. here: https://github.com/ethereumjs/ethereumjs-monorepo/blob/8e1c3cf9c47bfc037182c275f46eef405ef70dca/packages/devp2p/src/protocol/eth.ts#L43

Guards should be added so we don't unnecessarily generate debug strings in case we are not in debug mode.

jochem-brouwer avatar May 13 '22 20:05 jochem-brouwer

See e.g. VM here as reference for such a guard implementation/addition.

holgerd77 avatar Jul 04 '22 15:07 holgerd77

My first attempt, would be happy to hear what i did wrong :)

ai-slave avatar Sep 25 '22 19:09 ai-slave