Page MenuHomePhabricator

gui: Set CConnman byte counters earlier to avoid uninitialized reads
ClosedPublic

Authored by PiRK on Tue, Nov 17, 08:22.

Details

Summary

Initialize CConnman byte counters during construction, so GetTotalBytesRecv()
and GetTotalBytesSent() methods don't return garbage before Start() is called.

Change shouldn't have any effect outside of the GUI. It just fixes a race
condition during a qt test that was observed on travis

This is a backport of Core PR17906

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.