mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Use replaced transactions in compact block reconstruction
This commit is contained in:
parent
1531652e02
commit
93380c5247
4 changed files with 41 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue