Page MenuHomePhabricator

zmq test: Actually make reorg occur

Authored by PiRK on Tue, Oct 12, 08:25.


Group Reviewers
Restricted Project
rABC3cf2c996d877: zmq test: Actually make reorg occur

This PR creates a new ZMQ notifier that gives a "total hash history" of block (dis)connection, mempool addition/substraction, all in one pipeline. It also exposes a "mempool sequence number" to both this notifier and getrawmempool results, which allows the consumer to use the results together without confusion about ordering of results and without excessive getrawmempool polling.

See the functional test which shows the proposed user flow for the client-side tracking of mempool contents and confirmations.

Also fixes a legacy zmq test that didn't actually trigger a reorg because of identical blocks being generated on each side of the split(oops)

This is a backport of core#19572 [1/4]

Note: I wasn't able to reproduce the issue that this commit is supposed to fix. I tried adding an extra line after generating the 2 new blocks on node 1, without being able to get an identical block: assert disconnect_block not in connect_blocks

Test Plan

test/functional/ interface_zmq

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable