mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Do not skip pushing of vMatch and vHashes in CMerkleBlock (#2826)
Even if its a TX type which we don't want in merkle blocks. Wrongfully omitting the pushes causes invalid partial merkle trees, which in turn causes SPV nodes to ban us.
This commit is contained in:
parent
8c58799d8d
commit
575cafc011
@ -31,12 +31,10 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
|
||||
for (unsigned int i = 0; i < block.vtx.size(); i++)
|
||||
{
|
||||
const auto& tx = *block.vtx[i];
|
||||
if (tx.nVersion == 3 && !allowedTxTypes.count(tx.nType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const uint256& hash = tx.GetHash();
|
||||
if (filter.IsRelevantAndUpdate(tx))
|
||||
bool isAllowedType = tx.nVersion != 3 || allowedTxTypes.count(tx.nType) != 0;
|
||||
|
||||
if (isAllowedType && filter.IsRelevantAndUpdate(tx))
|
||||
{
|
||||
vMatch.push_back(true);
|
||||
vMatchedTxn.push_back(std::make_pair(i, hash));
|
||||
|
Loading…
Reference in New Issue
Block a user