mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Use replaced transactions in compact block reconstruction
This commit is contained in:
@@ -1879,7 +1879,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
}
|
||||
|
||||
PartiallyDownloadedBlock& partialBlock = *(*queuedBlockIt)->partialBlock;
|
||||
ReadStatus status = partialBlock.InitData(cmpctblock);
|
||||
ReadStatus status = partialBlock.InitData(cmpctblock, vExtraTxnForCompact);
|
||||
if (status == READ_STATUS_INVALID) {
|
||||
MarkBlockAsReceived(pindex->GetBlockHash()); // Reset in-flight state in case of whitelist
|
||||
Misbehaving(pfrom->GetId(), 100);
|
||||
@@ -1921,7 +1921,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
// Optimistically try to reconstruct anyway since we might be
|
||||
// able to without any round trips.
|
||||
PartiallyDownloadedBlock tempBlock(&mempool);
|
||||
ReadStatus status = tempBlock.InitData(cmpctblock);
|
||||
ReadStatus status = tempBlock.InitData(cmpctblock, vExtraTxnForCompact);
|
||||
if (status != READ_STATUS_OK) {
|
||||
// TODO: don't ignore failures
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user