Use two boolean literals instead of re-using variable
Summary:
Partial backport of Core PR10898 (commit 4971a9a)
https://github.com/bitcoin/bitcoin/pull/10898/commits/4971a9a3c928235ef4af29a7f72379cbb567e446
Test Plan: ninja check
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2624