HomePhabricator

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

Description

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>

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1611

Differential Revision: https://reviews.bitcoinabc.org/D9682

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Oct 12 2020, 20:57
FabienCommitted on Jun 15 2021, 12:25
jasonbcoxPushed on Jun 15 2021, 12:27
Parents
rSTAGING12031e53db48: util: Add Assume() identity function
Branches
Unknown
Tags
Unknown

Event Timeline