Page MenuHomePhabricator

[avalanche] Add some logging when stake contenders are cached or promoted
ClosedPublic

Authored by roqqit on Mar 26 2025, 22:55.

Details

Summary

These logs are only active with -avalanchestakingpreconsensus

I have been using this patch for over a week and it has been useful for debugging contender behavior.

Test Plan
./test/functional/test_runner.py --nocleanup abc_p2p_avalanche_contender_voting

Observe new lines in the node log

Event Timeline

roqqit requested review of this revision.Mar 26 2025, 22:55
Fabien requested changes to this revision.Mar 27 2025, 08:40
Fabien added a subscriber: Fabien.

For this kind of log you should use LogPrintLevel(BCLog::AVALANCHE, BCLog::Level::Debug, "foo bar baz\n");

src/avalanche/peermanager.cpp
1405–1408 ↗(On Diff #53273)
src/avalanche/stakecontendercache.cpp
72 ↗(On Diff #53273)

dito

This revision now requires changes to proceed.Mar 27 2025, 08:40
This revision is now accepted and ready to land.Mar 27 2025, 17:41