Page MenuHomePhabricator

CConnman: initialise at declaration rather than in Start()
ClosedPublic

Authored by PiRK on Dec 23 2021, 14:52.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC8286ac28c0c5: CConnman: initialise at declaration rather than in Start()
Summary

Ensure nMaxOutboundTotalBytesSentInCycle and nMaxOutboundCycleStartTime are initialized even if CConnman::Start() is not called. Prevents failures in test/fuzz/connman when run under valgrind.

nTotalBytesRecv and nTotalBytesSent are already initialized in the class definition, and CConnman::Start is only called once in AppInitMain, so removing the reinitialization in Start has no impact.

This is a backport of core#20408

Test Plan

With TSAN:
ninja && ninja check check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable