Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] fix miner_tests block generation race condition. #2233

Merged
merged 1 commit into from
Mar 10, 2021

Commits on Mar 7, 2021

  1. test: fix miner_tests block generation race condition.

    As we are "faking" the block creation based on the same CBlock shared_ptr and the pointer is shared across multiple threads, there is a possible race condition with the scheduler thread when we clear the transactions vector to add the new coinbase transaction for the next "new" block. If secondary thread is not fast enough, as we are doing all in the same loop non-stop, the thread could try to access to the block ptr vtx where there is no transactions, causing an UB.
    furszy committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    f12bd4c View commit details
    Browse the repository at this point in the history