HomePhabricator

simplify ValidDeployment check to avoid gcc warning

Description

simplify ValidDeployment check to avoid gcc warning

Summary:
Backport of core#22597

Simplifies the ValidDeployment check to only check the upperbound, relying on the lower bound to be trivially true due to enum values starting at the minimum value of the underlying type (which is checked at compile time in deploymentstatus.cpp). Avoids a "comparison always true" warning in some versions of gcc.

Our code differs from upstream. See D12220 and D3361 for details.

Test Plan:
Check there are no more warnings during the build:

ninja

For sanity:

ninja check

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Aug 3 2021, 11:54
sdulfariCommitted on Oct 18 2022, 15:55
sdulfariPushed on Oct 18 2022, 15:55
Reviewer
Restricted Project
Differential Revision
D12289: simplify ValidDeployment check to avoid gcc warning
Parents
rABC47626f928b9e: [Cashtab] Tx History should immediately update to include newly added contacts
Branches
Unknown
Tags
Unknown