Auto merge of #1581 - bitcartel:1464_ncc_2016_008, r=str4d
Fixes for NCC-2016-008 To close #1464 NCC-2016-088 - This PR - https://github.com/zcash/libsnark/pull/8 Of the 101 issues in NCC-2016-088, 62 are in dependencies, and many of the remainder are duplicates of the CIDs fixed in this PR. Commit log message is: CID Type (Type is from scan.coverity Type column)
This commit is contained in:
commit
a12eaa2bf2
|
@ -92,23 +92,23 @@ protected:
|
||||||
CMessageHeader::MessageStartChars pchMessageStart;
|
CMessageHeader::MessageStartChars pchMessageStart;
|
||||||
//! Raw pub key bytes for the broadcast alert signing key.
|
//! Raw pub key bytes for the broadcast alert signing key.
|
||||||
std::vector<unsigned char> vAlertPubKey;
|
std::vector<unsigned char> vAlertPubKey;
|
||||||
int nDefaultPort;
|
int nDefaultPort = 0;
|
||||||
int nMinerThreads;
|
int nMinerThreads = 0;
|
||||||
long nMaxTipAge;
|
long nMaxTipAge = 0;
|
||||||
uint64_t nPruneAfterHeight;
|
uint64_t nPruneAfterHeight = 0;
|
||||||
unsigned int nEquihashN;
|
unsigned int nEquihashN = 0;
|
||||||
unsigned int nEquihashK;
|
unsigned int nEquihashK = 0;
|
||||||
std::vector<CDNSSeedData> vSeeds;
|
std::vector<CDNSSeedData> vSeeds;
|
||||||
std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
|
std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
|
||||||
std::string strNetworkID;
|
std::string strNetworkID;
|
||||||
CBlock genesis;
|
CBlock genesis;
|
||||||
std::vector<SeedSpec6> vFixedSeeds;
|
std::vector<SeedSpec6> vFixedSeeds;
|
||||||
bool fRequireRPCPassword;
|
bool fRequireRPCPassword = false;
|
||||||
bool fMiningRequiresPeers;
|
bool fMiningRequiresPeers = false;
|
||||||
bool fDefaultConsistencyChecks;
|
bool fDefaultConsistencyChecks = false;
|
||||||
bool fRequireStandard;
|
bool fRequireStandard = false;
|
||||||
bool fMineBlocksOnDemand;
|
bool fMineBlocksOnDemand = false;
|
||||||
bool fTestnetToBeDeprecatedFieldRPC;
|
bool fTestnetToBeDeprecatedFieldRPC = false;
|
||||||
Checkpoints::CCheckpointData checkpointData;
|
Checkpoints::CCheckpointData checkpointData;
|
||||||
std::vector<std::string> vFoundersRewardAddress;
|
std::vector<std::string> vFoundersRewardAddress;
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
CBaseChainParams() {}
|
CBaseChainParams() {}
|
||||||
|
|
||||||
int nRPCPort;
|
int nRPCPort = 0;
|
||||||
std::string strDataDir;
|
std::string strDataDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ class CTxMemPoolEntry;
|
||||||
* they've been outstanding.
|
* they've been outstanding.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */
|
||||||
|
static const double DEFAULT_DECAY = .998;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We will instantiate two instances of this class, one to track transactions
|
* We will instantiate two instances of this class, one to track transactions
|
||||||
* that were included in a block due to fee, and one for tx's included due to
|
* that were included in a block due to fee, and one for tx's included due to
|
||||||
|
@ -105,7 +108,7 @@ private:
|
||||||
// Combine the total value with the tx counts to calculate the avg fee/priority per bucket
|
// Combine the total value with the tx counts to calculate the avg fee/priority per bucket
|
||||||
|
|
||||||
std::string dataTypeString;
|
std::string dataTypeString;
|
||||||
double decay;
|
double decay = DEFAULT_DECAY;
|
||||||
|
|
||||||
// Mempool counts of outstanding transactions
|
// Mempool counts of outstanding transactions
|
||||||
// For each bucket X, track the number of transactions in the mempool
|
// For each bucket X, track the number of transactions in the mempool
|
||||||
|
@ -179,9 +182,6 @@ public:
|
||||||
/** Track confirm delays up to 25 blocks, can't estimate beyond that */
|
/** Track confirm delays up to 25 blocks, can't estimate beyond that */
|
||||||
static const unsigned int MAX_BLOCK_CONFIRMS = 25;
|
static const unsigned int MAX_BLOCK_CONFIRMS = 25;
|
||||||
|
|
||||||
/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */
|
|
||||||
static const double DEFAULT_DECAY = .998;
|
|
||||||
|
|
||||||
/** Require greater than 85% of X fee transactions to be confirmed within Y blocks for X to be big enough */
|
/** Require greater than 85% of X fee transactions to be confirmed within Y blocks for X to be big enough */
|
||||||
static const double MIN_SUCCESS_PCT = .85;
|
static const double MIN_SUCCESS_PCT = .85;
|
||||||
static const double UNLIKELY_PCT = .5;
|
static const double UNLIKELY_PCT = .5;
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
// These contain trapdoors, values and other information
|
// These contain trapdoors, values and other information
|
||||||
// that the recipient needs, including a memo field. It
|
// that the recipient needs, including a memo field. It
|
||||||
// is encrypted using the scheme implemented in crypto/NoteEncryption.cpp
|
// is encrypted using the scheme implemented in crypto/NoteEncryption.cpp
|
||||||
boost::array<ZCNoteEncryption::Ciphertext, ZC_NUM_JS_OUTPUTS> ciphertexts;
|
boost::array<ZCNoteEncryption::Ciphertext, ZC_NUM_JS_OUTPUTS> ciphertexts = {{ {{0}} }};
|
||||||
|
|
||||||
// Random seed
|
// Random seed
|
||||||
uint256 randomSeed;
|
uint256 randomSeed;
|
||||||
|
@ -324,7 +324,7 @@ public:
|
||||||
const uint32_t nLockTime;
|
const uint32_t nLockTime;
|
||||||
const std::vector<JSDescription> vjoinsplit;
|
const std::vector<JSDescription> vjoinsplit;
|
||||||
const uint256 joinSplitPubKey;
|
const uint256 joinSplitPubKey;
|
||||||
const joinsplit_sig_t joinSplitSig;
|
const joinsplit_sig_t joinSplitSig = {{0}};
|
||||||
|
|
||||||
/** Construct a CTransaction that qualifies as IsNull() */
|
/** Construct a CTransaction that qualifies as IsNull() */
|
||||||
CTransaction();
|
CTransaction();
|
||||||
|
@ -403,7 +403,7 @@ struct CMutableTransaction
|
||||||
uint32_t nLockTime;
|
uint32_t nLockTime;
|
||||||
std::vector<JSDescription> vjoinsplit;
|
std::vector<JSDescription> vjoinsplit;
|
||||||
uint256 joinSplitPubKey;
|
uint256 joinSplitPubKey;
|
||||||
CTransaction::joinsplit_sig_t joinSplitSig;
|
CTransaction::joinsplit_sig_t joinSplitSig = {{0}};
|
||||||
|
|
||||||
CMutableTransaction();
|
CMutableTransaction();
|
||||||
CMutableTransaction(const CTransaction& tx);
|
CMutableTransaction(const CTransaction& tx);
|
||||||
|
|
|
@ -92,7 +92,7 @@ private:
|
||||||
unsigned int nTransactionsUpdated;
|
unsigned int nTransactionsUpdated;
|
||||||
CBlockPolicyEstimator* minerPolicyEstimator;
|
CBlockPolicyEstimator* minerPolicyEstimator;
|
||||||
|
|
||||||
uint64_t totalTxSize; //! sum of all mempool tx' byte sizes
|
uint64_t totalTxSize = 0; //! sum of all mempool tx' byte sizes
|
||||||
|
|
||||||
public:
|
public:
|
||||||
mutable CCriticalSection cs;
|
mutable CCriticalSection cs;
|
||||||
|
|
|
@ -163,7 +163,7 @@ private:
|
||||||
IncrementalMerkleTree<Depth, Hash> tree;
|
IncrementalMerkleTree<Depth, Hash> tree;
|
||||||
std::vector<Hash> filled;
|
std::vector<Hash> filled;
|
||||||
boost::optional<IncrementalMerkleTree<Depth, Hash>> cursor;
|
boost::optional<IncrementalMerkleTree<Depth, Hash>> cursor;
|
||||||
size_t cursor_depth;
|
size_t cursor_depth = 0;
|
||||||
std::deque<Hash> partial_path() const;
|
std::deque<Hash> partial_path() const;
|
||||||
IncrementalWitness(IncrementalMerkleTree<Depth, Hash> tree) : tree(tree) {}
|
IncrementalWitness(IncrementalMerkleTree<Depth, Hash> tree) : tree(tree) {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
|
|
||||||
class NotePlaintext {
|
class NotePlaintext {
|
||||||
public:
|
public:
|
||||||
uint64_t value;
|
uint64_t value = 0;
|
||||||
uint256 rho;
|
uint256 rho;
|
||||||
uint256 r;
|
uint256 r;
|
||||||
boost::array<unsigned char, ZC_MEMO_SIZE> memo;
|
boost::array<unsigned char, ZC_MEMO_SIZE> memo;
|
||||||
|
|
Loading…
Reference in New Issue