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> | ||||
namespace avalanche { | namespace avalanche { | ||||
constexpr uint32_t MIN_VALID_PROOF_SCORE = PROOF_DUST_THRESHOLD / COIN * 100; | |||||
deadalnix: Try to put the 100 * in front, so that it is not interpreted as being a divisor when glancing… | |||||
Proof buildRandomProof(uint32_t score, const CPubKey &master = CPubKey()); | Proof buildRandomProof(uint32_t score, const CPubKey &master = CPubKey()); | ||||
bool isProofStateDustThreshold(const Proof &proof); | |||||
deadalnixUnsubmitted Not Done Inline ActionsisProofStateDustThreshold is an incomprehensible name. deadalnix: `isProofStateDustThreshold` is an incomprehensible name. | |||||
} // namespace avalanche | } // namespace avalanche | ||||
#endif // BITCOIN_AVALANCHE_TEST_UTIL_H | #endif // BITCOIN_AVALANCHE_TEST_UTIL_H |
Try to put the 100 * in front, so that it is not interpreted as being a divisor when glancing over the code.