aboutsummaryrefslogtreecommitdiff
path: root/src/test/validationinterface_tests.cpp
AgeCommit message (Collapse)Author
2020-05-14test: Remove const to work around compiler error on xenialWladimir J. van der Laan
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;
2020-05-13miner: Avoid stack-use-after-return in validationinterfaceMarcoFalke
This is achieved by switching to a shared_ptr. Also, switch the validationinterfaces in the tests to use shared_ptrs for the same reason.
2020-05-13test: Add unregister_validation_interface_race testMarcoFalke
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
2020-04-08Fix unregister_all_during_call cleanupRussell Yanofsky
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 <fanquake@gmail.com> https://github.com/bitcoin/bitcoin/pull/18551#issuecomment-610974251
2020-04-07Add test for UnregisterAllValidationInterfaces bugRussell Yanofsky
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