Page MenuHomePhabricator

net: Assume that SetCommonVersion is called at most once per peer
ClosedPublic

Authored by Fabien on Jun 15 2021, 07:22.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC61bb4c4afc5a: net: Assume that SetCommonVersion is called at most once per peer
Summary
This restores the check removed in #17785 (comment)

Instead of using error, which was used previously, it uses a newly
introduced Assume(). error had several issues:

    It logs unconditionally to the debug log
    It doesn't abort the program when the error is hit in tests

Backport of core#20138.

Depends on D9680.

Ref T1611.

Test Plan
ninja all check-all

ninja bitcoin-fuzzers
./src/test/fuzz/net <path_to_corpus>