Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/test/util.h
// Copyright (c) 2020 The Bitcoin developers | // Copyright (c) 2020 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_AVALANCHE_TEST_UTIL_H | #ifndef BITCOIN_AVALANCHE_TEST_UTIL_H | ||||
#define BITCOIN_AVALANCHE_TEST_UTIL_H | #define BITCOIN_AVALANCHE_TEST_UTIL_H | ||||
#include <avalanche/proof.h> | #include <avalanche/proof.h> | ||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <cstdio> | #include <cstdio> | ||||
// Minimum score to reach a value of PROOF_DUST_THRESHOLD | |||||
constexpr uint32_t MIN_SCORE_DUST = PROOF_DUST_THRESOLD / COIN * 100; | |||||
// Minimum score to reach a value of PROOF_MIN_TOTAL_AMOUNT | |||||
constexpr uint32_t MIN_SCORE = PROOF_MIN_TOTAL_AMOUNT / COIN * 100; | |||||
// Minimum score to reach a value of PROOF_MIN_TOTAL_AMOUNT | |||||
const uint32_t MAX_SCORE = MAX_MONEY / COIN * 100; | |||||
namespace avalanche { | namespace avalanche { | ||||
Proof buildRandomProof(uint32_t score, const CPubKey &master = CPubKey()); | Proof buildRandomProof(uint32_t score, const CPubKey &master = CPubKey()); | ||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_TEST_UTIL_H | #endif // BITCOIN_AVALANCHE_TEST_UTIL_H |