Page MenuHomePhabricator

[avalanche] Make stale voting parameters configurable
ClosedPublic

Authored by sdulfari on May 31 2022, 18:27.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCc8b5dd7de231: [avalanche] Make stale voting parameters configurable
Summary

As we write more tests involving stale votes, functional testing times get too long.
This patch makes those voting parameters configurable and saves ~40 seconds when
running abc_p2p_avalanche_proof_voting on my machine.

This also gives fine tuned control to node operators, should it ever be necessary
to modify these parameters.

Test Plan
ninja check check-functional

Diff Detail

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

Event Timeline

deadalnix requested changes to this revision.May 31 2022, 19:16
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/avalanche/processor.cpp
343 ↗(On Diff #33755)

This clearly make no sense to multiply these parameters on each vote reccord.

This revision now requires changes to proceed.May 31 2022, 19:16

Pass voting parameters into isStale() instead of needlessly copying them around in VoteRecord.

deadalnix added inline comments.
src/avalanche/voterecord.h
14 ↗(On Diff #33761)

There is no need to change these.

17 ↗(On Diff #33761)

dito

This revision is now accepted and ready to land.Jun 1 2022, 11:03