mempool: Save & restore mempool entry acceptance height on reorg
Summary
MR !1128 (merged) 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.
Test Plan
ninja all check
test/functional/test_runner.py mempool_reorg
ninja bench_bitcoin && src/bench/bench_bitcoin -filter=Reorg.\*
Edited by Calin Culianu