HomePhabricator

Merge #12861: [tests] Stop feature_block.py from blowing up memory.

Description

Merge #12861: [tests] Stop feature_block.py from blowing up memory.

Summary:
PR12861 backport https://github.com/bitcoin/bitcoin/pull/12861/files
89fe5feea2 [tests] Stop feature_block.py from blowing up memory. (John Newbery)

Pull request description:

The new P2PDataStore class was sending full blocks in headers messages,
which meant that calls to send_blocks_and_test() would blow up memory if
called with a large number of blocks. Fix that by only sending headers
in headers messages.

This means that python should use just over 1GB for feature_block.py (with bitcoind also using just over 1GB). That's the same as before the feature_block.py refactor.

Backporter note: our feature_block.py isn't updated to use this yet, so we
don't have the bug. But it's good to bring this fix in now.

Depends on D3494

Test Plan: test_runner.py

Reviewers: deadalnix, jasonbcox, Fabien, #bitcoin_abc

Reviewed By: jasonbcox, #bitcoin_abc

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Apr 2 2018, 21:40
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on Jul 2 2019, 04:02
markblundebergPushed on Jul 2 2019, 04:02
Reviewer
Restricted Project
Differential Revision
D3495: Merge #12861: [tests] Stop feature_block.py from blowing up memory.
Parents
rABC571dda17c215: Merge #10479: [trivial] Fix comment for ForceSetArg()
Branches
Unknown
Tags
Unknown