mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
fix segfault when block from disk has pegin failure
This commit is contained in:
parent
e93a6fb502
commit
2d1a092ff2
1 changed files with 2 additions and 2 deletions
|
|
@ -3117,13 +3117,13 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
|
|||
pblocktree->ReadInvalidBlockQueue(vinvalidBlocks);
|
||||
bool blockAlreadyInvalid = false;
|
||||
BOOST_FOREACH(uint256& hash, vinvalidBlocks) {
|
||||
if (hash == pblock->GetHash()) {
|
||||
if (hash == blockConnecting.GetHash()) {
|
||||
blockAlreadyInvalid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!blockAlreadyInvalid) {
|
||||
vinvalidBlocks.push_back(pblock->GetHash());
|
||||
vinvalidBlocks.push_back(blockConnecting.GetHash());
|
||||
pblocktree->WriteInvalidBlockQueue(vinvalidBlocks);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue