ethereumjs-monorepo
ethereumjs-monorepo copied to clipboard
DevP2P debug strings optimization
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.
See e.g. VM here as reference for such a guard implementation/addition.
My first attempt, would be happy to hear what i did wrong :)