HomePhabricator

Don't assert(...) with side effects

Description

Don't assert(...) with side effects

Summary:
This diffs fixes the assertions introduced in D3232 and adds a linter to
avoid reproducing the issue.

The fix is a backport of core PR14088
https://github.com/bitcoin/bitcoin/pull/14088/files
The linter is based on the second commit, but integrated into arcanist.

Test Plan:

./src/test/test_bitcoin -t scheduler_tests

Revert the changes in scheduler_tests and run:

arc lint -- src/test/scheduler_tests.cpp

The linter should catch the errors

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D3277

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on Aug 28 2018, 08:19
FabienCommitted on Jun 10 2019, 21:19
FabienPushed on Jun 10 2019, 21:19
Reviewer
Restricted Project
Differential Revision
D3277: Don't assert(...) with side effects
Parents
rABC3a9a129d78b5: [LINTER] Add a spell checker to arcanist
Branches
Unknown
Tags
Unknown

Event Timeline