HomePhabricator

Move handling of unconnecting headers into own function

Description

Move handling of unconnecting headers into own function

Summary:
This introduces a minor change in the misbehavior score: previously a non-connecting non-continuous header sequence of size MAX_BLOCKS_TO_ANNOUNCE+1 was assigned 20 (non-continuous headers sequence), now it is assigned 10 (invalid header received).
The behavior is unchanged if the number of headers is <= MAX_BLOCKS_TO_ANNOUNCE.

This is a partial backport of core#25454
https://github.com/bitcoin/bitcoin/pull/25454/commits/7f2450871b3ea0b4d02d56bd2ca365fcc25cf90e

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Suhas Daftuar <sdaftuar@gmail.com>Authored on Feb 8 2022, 22:02
PiRKCommitted on Dec 5 2023, 18:25
PiRKPushed on Dec 5 2023, 18:25
Reviewer
Restricted Project
Differential Revision
D14906: Move handling of unconnecting headers into own function
Parents
rABCf4c252de3fdd: Reduce CTxMemPool constructor call sites
Branches
Unknown
Tags
Unknown