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() {}
// 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];
}