Every ~500 runs, the rdPoS validateBlock(), ten block from genesis SECTION of an rdPoS testcase fails the following assert, after the blockchainWrapper is destructed and then reloaded from disk.
Upon inspecting both seeds, the seed on the left is from block 9, and the seed from the right is from block 10.
This issue can still be reproduced by e.g. putting a sleep of 1 second before the scope-close that calls the destructor of the first blockchainWrapper.
This issue was root-caused to the "latest" key in the DB being raced by the threads that do block saving. If block 10 is written then block 9 is written out of order, the "latest" key gets assigned to block 9.
Every ~500 runs, the
rdPoS validateBlock(), ten block from genesis
SECTION of an rdPoS testcase fails the following assert, after the blockchainWrapper is destructed and then reloaded from disk.Upon inspecting both seeds, the seed on the left is from block 9, and the seed from the right is from block 10.
This issue can still be reproduced by e.g. putting a sleep of 1 second before the scope-close that calls the destructor of the first blockchainWrapper.