aboutsummaryrefslogtreecommitdiff
path: root/src/test/validationinterface_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* test: Remove const to work around compiler error on xenialWladimir J. van der Laan2020-05-141-1/+1
| | | | | | | | Fix the following error in travis: test/validationinterface_tests.cpp:26:36: error: default initialization of an object of const type 'const BlockValidationState' without a user-provided default constructor const BlockValidationState state_dummy;
* miner: Avoid stack-use-after-return in validationinterfaceMarcoFalke2020-05-131-5/+3
| | | | | | | This is achieved by switching to a shared_ptr. Also, switch the validationinterfaces in the tests to use shared_ptrs for the same reason.
* test: Add unregister_validation_interface_race testMarcoFalke2020-05-131-0/+36
| | | | | | | | | | | | | This commit is (intentionally) adding a broken test. The test is broken because it registering a subscriber object that can go out of scope while events are still being sent. To run the broken test and reproduce the bug: - Remove comment /** and */ - ./configure --with-sanitizers=address - export ASAN_OPTIONS=detect_leaks=0 - make - while ./src/test/test_bitcoin -t validationinterface_tests/unregister_validation_interface_race --catch_system_errors=no ; do true; done
* Fix unregister_all_during_call cleanupRussell Yanofsky2020-04-081-5/+2
| | | | | | | | | Use TestingSetup fixture to fix unregister_all_during_call test not calling UnregisterBackgroundSignalScheduler, which could trigger an assert in RegisterBackgroundSignalScheduler when called in later tests Failure reported by fanquake <[email protected]> https://github.com/bitcoin/bitcoin/pull/18551#issuecomment-610974251
* Add test for UnregisterAllValidationInterfaces bugRussell Yanofsky2020-04-071-0/+63
Bug in MainSignalsInstance::Clear could cause validation interface callbacks to be deleted during execution if UnregisterAllValidationInterfaces was called more than once. Bug was introduced in https://github.com/bitcoin/bitcoin/pull/18524 and is fixed by https://github.com/bitcoin/bitcoin/pull/18551