HomePhabricator

Make sure we do not drop transactions during reorg when the don't come in…

Description

Make sure we do not drop transactions during reorg when the don't come in topological order.

Summary:
AcceptToMemoryPool expecttransaction to be passed in one by one in topological order. As a result, many transaction gets rejected because input are not available.

The obvious long term solution is to refactor memory pool acceptance, but in the meantime, we can ensure topological order when we reinsert transactions in the mempool after reorgs.

Test Plan:

make check
./test/functional/test_runner.py --extended

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

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