Page MenuHomePhabricator

scripted-diff: Use randbits/bool instead of randrange where possible
ClosedPublic

Authored by deadalnix on Jan 4 2018, 15:14.

Details

Summary

As per Pieter Wuille' work.

-BEGIN VERIFY SCRIPT-
sed -i 's/insecure_randbits(1)/insecure_randbool()/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(2)/insecure_randbool()/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(4)/insecure_randbits(2)/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(32)/insecure_randbits(5)/g' src/test/*_tests.cpp
sed -i 's/insecure_randrange(256)/insecure_randbits(8)/g' src/test/*_tests.cpp
-END VERIFY SCRIPT-

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
randtestuse
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1510
Build 1510: arc lint + arc unit