void SetNull()
{
nVersion = CTransaction::CURRENT_VERSION;
- nTime = GetAdjustedTime();
+ nTime = (uint32_t) GetAdjustedTime();
vin.clear();
vout.clear();
nLockTime = 0;
filein >> *this;
}
catch (std::exception &e) {
+ (void)e;
return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION);
}
hashSig >>= 159; // take the first bit of the hash
if (fDebug && GetBoolArg("-printstakemodifier"))
printf(" entropybit=%" PRId64 "\n", hashSig.Get64());
- return hashSig.Get64();
+ return (unsigned int)hashSig.Get64();
}
// ppcoin: two types of block: proof-of-work or proof-of-stake
BOOST_FOREACH(const CTransaction& tx, vtx)
vMerkleTree.push_back(tx.GetHash());
int j = 0;
- for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
+ for (int nSize = (int)vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
{
for (int i = 0; i < nSize; i += 2)
{
BuildMerkleTree();
std::vector<uint256> vMerkleBranch;
int j = 0;
- for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
+ for (int nSize = (int)vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
{
int i = std::min(nIndex^1, nSize-1);
vMerkleBranch.push_back(vMerkleTree[j+i]);
filein >> *this;
}
catch (std::exception &e) {
+ (void)e;
return error("%s() : deserialize or I/O error", BOOST_CURRENT_FUNCTION);
}
bool GeneratedStakeModifier() const
{
- return (nFlags & BLOCK_STAKE_MODIFIER);
+ return (nFlags & BLOCK_STAKE_MODIFIER) != 0;
}
void SetStakeModifier(uint64_t nModifier, bool fGeneratedStakeModifier)
void clear();
void queryHashes(std::vector<uint256>& vtxid);
- unsigned long size()
+ size_t size()
{
LOCK(cs);
return mapTx.size();