mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
scripted-diff: [test] Use g_rng/m_rng directly
-BEGIN VERIFY SCRIPT-
# Use m_rng in unit test files
ren() { sed -i "s:\<$1\>:$2:g" $( git grep -l "$1" src/test/*.cpp src/wallet/test/*.cpp src/test/util/setup_common.cpp ) ; }
ren InsecureRand32 m_rng.rand32
ren InsecureRand256 m_rng.rand256
ren InsecureRandBits m_rng.randbits
ren InsecureRandRange m_rng.randrange
ren InsecureRandBool m_rng.randbool
ren g_insecure_rand_ctx m_rng
ren g_insecure_rand_ctx_temp_path g_rng_temp_path
-END VERIFY SCRIPT-
This commit is contained in:
parent
fa54cab473
commit
fa0fe08eca
40 changed files with 286 additions and 286 deletions
|
|
@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE(siphash)
|
|||
for (int i = 0; i < 16; ++i) {
|
||||
uint64_t k1 = ctx.rand64();
|
||||
uint64_t k2 = ctx.rand64();
|
||||
uint256 x = InsecureRand256();
|
||||
uint256 x = m_rng.rand256();
|
||||
uint32_t n = ctx.rand32();
|
||||
uint8_t nb[4];
|
||||
WriteLE32(nb, n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue