aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-02 11:30:12 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-03-02 11:30:17 +0100
commitcfce346508f1f7513a0cfa2cea7d7f8336d01c6b (patch)
tree7d229428a32c866909d5da22f247717dd20003da /configure.ac
parent72e6979b31baa48b82e713b63a896aebf75ae8c8 (diff)
parent8a8c6383f6f9da10b931f00ca1220408fede8f35 (diff)
downloadbitcoin-cfce346508f1f7513a0cfa2cea7d7f8336d01c6b.tar.xz
Merge #21310: zmq test: fix sync-up by matching notification to generated block
8a8c6383f6f9da10b931f00ca1220408fede8f35 zmq test: fix sync-up by matching notification to generated block (Sebastian Falbesoner) Pull request description: This is a follow-up PR for #21008, fixes #21216. In the course of investigating the problem with jnewbery (analyzing the Cirrus log https://cirrus-ci.com/task/4660108304056320), it turned out that the "sync up" procedure of repeatedly generating a block and waiting for a notification with timeout is too brittle in its current form, as the following scenario could happen: - generate block A - receive notification, timeout happens => repeat procedure - generate block B - node publishes block A notification - receive notification, we receive the one caused by block A (!!!) => sync-up procedure is completed - node publishes block B notification - the actual test starts - on the first notification reception, the one caused by block B is received, rather than the one actually caused by test code => assertion failure This change in the PR ensures that after each test block generation, we wait for the notification that is actually caused by that block and ignore others from possibly earlier blocks. The matching is kind of ugly, it assumes that one out of four components in the block is contained in the notification: the block hash, the tx id, the raw block data or the raw transaction data. (Unfortunately we have to support all publisher topics.) I'm aware that this is quite a lot of code now only for establishing a robust test setup. OTOH I wouldn't know of a better method right now, suggestions are very welcome. Note for potential reviewers: for both reproducing the issue on master branch and verifying on PR branch, one can simply generate two blocks in the sync-up procedure rather than one. ACKs for top commit: MarcoFalke: Concept ACK 8a8c6383f6f9da10b931f00ca1220408fede8f35 Tree-SHA512: a2eb78ba06dfd0fda7b1c111b6bbfb5dab4ab08500cc19c7ea02c3239495d5c74cc7d45250a8b3ecc78ca42d97ee6719bf73db8a137839e5e09a3cfcf08ed29e
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions