hashSalt = GetRandHash();
uint64_t hashAddr = addr.GetHash();
uint256 hashRand = hashSalt ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/nOneDay);
- hashRand = Hash(BEGIN(hashRand), END(hashRand));
+ hashRand = Hash(hashRand.begin(), hashRand.end());
multimap<uint256, CNode*> mapMix;
for(CNode* pnode : vNodes)
{
unsigned int nPointer;
memcpy(&nPointer, &pnode, sizeof(nPointer));
uint256 hashKey = hashRand ^ nPointer;
- hashKey = Hash(BEGIN(hashKey), END(hashKey));
+ hashKey = Hash(hashKey.begin(), hashKey.end());
mapMix.insert(make_pair(hashKey, pnode));
}
int nRelayNodes = fReachable ? 2 : 1; // limited relaying of addresses outside our network(s)
if (hashSalt == 0)
hashSalt = GetRandHash();
uint256 hashRand = inv.hash ^ hashSalt;
- hashRand = Hash(BEGIN(hashRand), END(hashRand));
+ hashRand = Hash(hashRand.begin(), hashRand.end());
bool fTrickleWait = ((hashRand & 3) != 0);
if (fTrickleWait)
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;
Object result;
result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata))));
- result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget))));
+ result.push_back(Pair("target", HexStr(hashTarget.begin(), hashTarget.end())));
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << coinbaseTx;
Array merkle_arr;
for(uint256 merkleh : merkle) {
- merkle_arr.push_back(HexStr(BEGIN(merkleh), END(merkleh)));
+ merkle_arr.push_back(HexStr(merkleh.begin(), merkleh.end()));
}
result.push_back(Pair("merkle", merkle_arr));
result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated
result.push_back(Pair("data", HexStr(BEGIN(pdata), END(pdata))));
result.push_back(Pair("hash1", HexStr(BEGIN(phash1), END(phash1)))); // deprecated
- result.push_back(Pair("target", HexStr(BEGIN(hashTarget), END(hashTarget))));
+ result.push_back(Pair("target", HexStr(hashTarget.begin(), hashTarget.end())));
return result;
}
else