HomePhabricator

mempool: Save & restore mempool entry acceptance height on reorg

Description

mempool: Save & restore mempool entry acceptance height on reorg

Summary:

MR !1128 introduced a regression whereby mempool entry acceptance height
would be lost across reorgs and just set to the new tip height after the
block unwind is done.  This MR fixes that and restores previous behavior
where a mempool entry's acceptance height is remembered until a
node restart (at which point it is lost since it is not serialized).

The `mempool_reorg.py` functional test was modified to also test that the
height is preserved properly across reorgs.

Port of bchn#1162. Depends on D13133.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

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

Details

Provenance
CCulianuAuthored on Apr 10 2021, 16:23
FabienCommitted on Feb 21 2023, 10:32
FabienPushed on Feb 21 2023, 10:32
Reviewer
Restricted Project
Differential Revision
D13141: mempool: Save & restore mempool entry acceptance height on reorg
Parents
rABCeec0e0c7b0f0: mempool: Add topological index, enforce consistency, updated reorg logic
Branches
Unknown
Tags
Unknown