Use cmpctblock type 2 for segwit-enabled transfer

Contains version negotiation logic by Matt Corallo and bugfixes by
Suhas Daftuar.

Github-Pull: #8393
Rebased-From: 6aa28abf53
This commit is contained in:
Pieter Wuille
2016-06-25 19:17:45 +02:00
committed by Wladimir J. van der Laan
parent 611cc5096e
commit fe1975a974
6 changed files with 64 additions and 30 deletions

View File

@@ -444,7 +444,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
totalTxSize += entry.GetTxSize();
minerPolicyEstimator->processTransaction(entry, fCurrentEstimate);
vTxHashes.emplace_back(hash, newit);
vTxHashes.emplace_back(tx.GetWitnessHash(), newit);
newit->vTxHashesIdx = vTxHashes.size() - 1;
return true;