Page MenuHomePhabricator

[avalanche] remove unnecessary nullptr checks for g_avalanche
ClosedPublic

Authored by PiRK on May 30 2024, 13:08.

Details

Summary

m_max_avalanche_outbound is set to 0 if avalanche is disabled, so the check in net.cpp is redundant. This allows removing some setup code in net_tests.cpp that was working around this check in the context of unit tests when g_avalanche is not initialized.

The checks in init.cpp::AppInitMain() are redundant because they happen after

if (!g_avalanche) {
    InitError(avalancheError);
    return false;
}

Depends on D16256

Test Plan

ninja all check-all