HomePhabricator

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

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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

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

Reviewers: schancel, #bitcoin_abc

Reviewed By: schancel, #bitcoin_abc

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

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on May 23 2017, 23:18
deadalnixCommitted on Jan 5 2018, 12:40
schancelPushed on Jan 5 2018, 23:52
Reviewer
Restricted Project
Differential Revision
D890: scripted-diff: Use randbits/bool instead of randrange where possible
Parents
rSTAGING8d0e1f069cbe: Use randbits instead of ad-hoc emulation in prevector tests
Branches
Unknown
Tags
Unknown