Motivation/rationale: Minor nit.
Background:
See: https://en.cppreference.com/w/cpp/memory/new/operator_new
operator new()
does not normally ever return nullptr
unless one
explicitly uses the std::nothrow
version or unless one redefines it. Neither
is the case in this entire codebase, hence the check for nullptr
for the
return value from BlockAssembler::CreateNewBlock
was entirely
superfluous and all branches that test it would always evaluate to
false
. So, it can be safely removed in the interests of code quality.
tl;dr: operator new()
either succeeds or throws std::bad_alloc
, it can
never return nullptr
.