HomePhabricator

Fix message size check for max block sizes much smaller than max protocol…

Description

Fix message size check for max block sizes much smaller than max protocol message size

Summary:
This fixes a subtle bug: if max block size * 2 is less than max protocol message size, messages could be rejected.
This should not be an issue unless or until MAX_PROTOCOL_MESSAGE_LENGTH is made much larger.

Test Plan:

ninja check check-functional

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Jun 14 2024, 22:18
roqqitPushed on Jun 20 2024, 17:20
Reviewer
Restricted Owners Package
Differential Revision
D16343: Fix message size check for max block sizes much smaller than max protocol message size
Parents
rABC7abe30a0a8b1: [electrum] minor cleanup in Transaction.verify_signature
Branches
Unknown
Tags
Unknown