mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-01 09:35:52 -05:00
kernel: Make bitcoin-chainstate's block validation mirror submitblock's
The behaviour of submitblock was changed in the previous commit, so change it here too.
This commit is contained in:
parent
bb53ce9bda
commit
73db95c65c
1 changed files with 0 additions and 21 deletions
|
@ -180,27 +180,6 @@ int main(int argc, char* argv[])
|
|||
break;
|
||||
}
|
||||
|
||||
if (block.vtx.empty() || !block.vtx[0]->IsCoinBase()) {
|
||||
std::cerr << "Block does not start with a coinbase" << std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
uint256 hash = block.GetHash();
|
||||
{
|
||||
LOCK(cs_main);
|
||||
const CBlockIndex* pindex = chainman.m_blockman.LookupBlockIndex(hash);
|
||||
if (pindex) {
|
||||
if (pindex->IsValid(BLOCK_VALID_SCRIPTS)) {
|
||||
std::cerr << "duplicate" << std::endl;
|
||||
break;
|
||||
}
|
||||
if (pindex->nStatus & BLOCK_FAILED_MASK) {
|
||||
std::cerr << "duplicate-invalid" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LOCK(cs_main);
|
||||
const CBlockIndex* pindex = chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock);
|
||||
|
|
Loading…
Add table
Reference in a new issue