forked from lthn/blockchain
The crypto test PRNG was non-deterministic because setup_random() seeded the state but grant_random_initialize_no_lock() overwrote it with /dev/urandom on the first random call. Calling it before memset ensures the initialized flag is set, preventing the overwrite. Also adds --generate mode to crypto-tests for future vector regeneration, updates checkpoint hashes for multisig_and_checkpoints (height 15) and gen_no_attchments_in_coinbase (height 12), and replaces hardcoded Zano addresses/URLs with Lethean equivalents in manual test scaffolding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
369 B
C
12 lines
369 B
C
// Copyright (c) 2012-2013 The Cryptonote developers
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include "crypto/random.c"
|
|
|
|
#include "crypto-tests.h"
|
|
|
|
void setup_random(void) {
|
|
grant_random_initialize_no_lock();
|
|
memset(&state, 42, sizeof(union hash_state));
|
|
}
|