nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

Consistently FATAL before crashing

Open mratsim opened this issue 5 years ago • 1 comments

We have a couple of asserts to catch logic bugs that should never happen, for example https://github.com/status-im/nimbus-eth2/pull/1860#discussion_r503362155

Just in case they happen, we want to make sure that those are logged even when Nimbus is working without a CLI for example when logging to json.

This requires either use a fatal logging before doAssert or introduce something like fatalAssert that does both.

Additionally we might want FATAL log to automatically capture the stacktrace.

mratsim avatar Oct 15 '20 12:10 mratsim

This seems reasonable as a goal. I'm in favor of ensuring that the easy thing is correct, i.e. something like a fatalAssert.

tersec avatar Oct 15 '20 12:10 tersec