extern int64_t nTimeBestReceived;
extern CCriticalSection cs_setpwalletRegistered;
extern set<CWallet*> setpwalletRegistered;
-extern uint8_t pchMessageStart[4];
+extern uint32_t nNetworkID;
extern map<uint256, CBlock*> mapOrphanBlocks;
// Settings
{
private:
CScript scriptPubKey;
- const CTransaction *ptxTo;
- unsigned int nIn;
- unsigned int nFlags;
- int nHashType;
+ const CTransaction *ptxTo = nullptr;
+ unsigned int nIn = 0;
+ unsigned int nFlags = 0;
+ int nHashType = 0;
public:
CScriptCheck() {}
for(const uint256& otherside : vMerkleBranch)
{
if (nIndex & 1)
- hash = Hash(BEGIN(otherside), END(otherside), BEGIN(hash), END(hash));
+ hash = Hash(otherside.begin(), otherside.end(), hash.begin(), hash.end());
else
- hash = Hash(BEGIN(hash), END(hash), BEGIN(otherside), END(otherside));
+ hash = Hash(hash.begin(), hash.end(), otherside.begin(), otherside.end());
nIndex >>= 1;
}
return hash;
// Write index header
unsigned int nSize = fileout.GetSerializeSize(*this);
- fileout << FLATDATA(pchMessageStart) << nSize;
+ fileout << nNetworkID << nSize;
// Write block
long fileOutPos = ftell(fileout);
return mapTx.size();
}
- bool exists(uint256 hash)
+ bool exists(const uint256 &hash)
{
return (mapTx.count(hash) != 0);
}
- CTransaction& lookup(uint256 hash)
+ CTransaction& lookup(const uint256 &hash)
{
return mapTx[hash];
}