rename test/bench
This commit is contained in:
@@ -17,7 +17,11 @@ static const int STAKE_MIN_CONFIRMATIONS = 500;
|
||||
|
||||
/** Flags for nSequence and nLockTime locks */
|
||||
enum {
|
||||
/* Interpret sequence numbers as relative lock-time constraints. */
|
||||
LOCKTIME_VERIFY_SEQUENCE = (1 << 0),
|
||||
|
||||
/* Use GetMedianTimePast() instead of nTime for end point timestamp. */
|
||||
LOCKTIME_MEDIAN_TIME_PAST = (1 << 1),
|
||||
};
|
||||
|
||||
#endif // BITCOIN_CONSENSUS_CONSENSUS_H
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include "merkle.h"
|
||||
#include "hash.h"
|
||||
#include "utilstrencodings.h"
|
||||
#include <consensus/merkle.h>
|
||||
#include <hash.h>
|
||||
#include <utilstrencodings.h>
|
||||
|
||||
/* WARNING! If you're reading this because you're learning about crypto
|
||||
and/or designing a new system that will use merkle trees, keep in mind
|
||||
@@ -101,7 +101,7 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
|
||||
bool matchh = matchlevel == level;
|
||||
while (count != (((uint32_t)1) << level)) {
|
||||
// If we reach this point, h is an inner value that is not the top.
|
||||
// We combine it with itself (Bitcoin's special rule for odd levels in
|
||||
// We combine it with itself (Blackcoin's special rule for odd levels in
|
||||
// the tree) to produce a higher level one.
|
||||
if (pbranch && matchh) {
|
||||
pbranch->push_back(h);
|
||||
@@ -132,13 +132,13 @@ static void MerkleComputation(const std::vector<uint256>& leaves, uint256* proot
|
||||
|
||||
uint256 ComputeMerkleRoot(const std::vector<uint256>& leaves, bool* mutated) {
|
||||
uint256 hash;
|
||||
MerkleComputation(leaves, &hash, mutated, -1, NULL);
|
||||
MerkleComputation(leaves, &hash, mutated, -1, nullptr);
|
||||
return hash;
|
||||
}
|
||||
|
||||
std::vector<uint256> ComputeMerkleBranch(const std::vector<uint256>& leaves, uint32_t position) {
|
||||
std::vector<uint256> ret;
|
||||
MerkleComputation(leaves, NULL, NULL, position, &ret);
|
||||
MerkleComputation(leaves, nullptr, nullptr, position, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
#include "primitives/transaction.h"
|
||||
#include "primitives/block.h"
|
||||
#include "uint256.h"
|
||||
#include <primitives/transaction.h>
|
||||
#include <primitives/block.h>
|
||||
#include <uint256.h>
|
||||
|
||||
uint256 ComputeMerkleRoot(const std::vector<uint256>& leaves, bool* mutated = NULL);
|
||||
std::vector<uint256> ComputeMerkleBranch(const std::vector<uint256>& leaves, uint32_t position);
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#ifndef BITCOIN_CONSENSUS_PARAMS_H
|
||||
#define BITCOIN_CONSENSUS_PARAMS_H
|
||||
|
||||
#include "uint256.h"
|
||||
#include <amount.h>
|
||||
#include <uint256.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ static const unsigned char REJECT_CHECKPOINT = 0x43;
|
||||
class CValidationState {
|
||||
private:
|
||||
enum mode_state {
|
||||
MODE_VALID, //!< everything ok
|
||||
MODE_INVALID, //!< network rule violation (DoS value may be set)
|
||||
MODE_ERROR, //!< run-time error
|
||||
MODE_VALID, //! everything ok
|
||||
MODE_INVALID, //! network rule violation (DoS value may be set)
|
||||
MODE_ERROR, //! run-time error
|
||||
} mode;
|
||||
int nDoS;
|
||||
std::string strRejectReason;
|
||||
|
||||
Reference in New Issue
Block a user