diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-02-27 18:32:48 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-03-01 01:31:41 +0100 |
commit | 8a8c6383f6f9da10b931f00ca1220408fede8f35 (patch) | |
tree | 67f6e7c30e287bfc22ea7f24687e7b24f45dd45c /src/wallet/db.cpp | |
parent | fb67caebe26f49a1edfff20c754b8217ef4f23ad (diff) | |
download | bitcoin-8a8c6383f6f9da10b931f00ca1220408fede8f35.tar.xz |
zmq test: fix sync-up by matching notification to generated block
It turned out that the "sync up" procedure of repeatedly generating a
block and waiting for a notification once with timeout is too naive 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
- the actual test starts
- on the first notification reception, one caused by block B is received,
rather than the one actually caused by test code, leading to failure
This change 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.
Co-authored-by: Jon Atack <jon@atack.com>
Diffstat (limited to 'src/wallet/db.cpp')
0 files changed, 0 insertions, 0 deletions