Merge #10514: Bugfix: missing == 0 after randrange
Summary:
9aa215b Bugfixes: missing == 0 after randrange (Pieter Wuille)
Tree-SHA512: 160657ac09553f23ad7a3966c753a30ba938ce6f7ccfd34a4ef0d05d73d712362f7eef97e44a96e37a181b8347caa9d8e1584cc4485f69674ab2de3d8a247373
Backport of Core PR10514
https://github.com/bitcoin/bitcoin/pull/10514/
Test Plan:
make check
Reviewers: jasonbcox, deadalnix, Fabien, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D3240