|
|
@ -2239,6 +2239,29 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
header = block.GetBlockHeader(); |
|
|
|
|
|
|
|
vtx.reserve(block.vtx.size()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(unsigned int i = 0; i < block.vtx.size(); i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
vector<uint256> branch = block.GetMerkleBranch(i); |
|
|
|
|
|
|
|
uint256 hash = block.vtx[i].GetHash(); |
|
|
|
|
|
|
|
if (filter.IsRelevantAndUpdate(block.vtx[i], hash)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
vtx.push_back(make_tuple(i, hash, branch)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool CheckDiskSpace(uint64 nAdditionalBytes) |
|
|
|
bool CheckDiskSpace(uint64 nAdditionalBytes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available; |
|
|
|
uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available; |
|
|
|