Page MenuHomePhabricator

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

Authored by roqqit on Wed, Mar 26, 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

Diff Detail

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

Event Timeline

roqqit requested review of this revision.Wed, Mar 26, 22:55
Fabien requested changes to this revision.Thu, Mar 27, 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.Thu, Mar 27, 08:40
This revision is now accepted and ready to land.Thu, Mar 27, 17:41