Skip to content

Commit 73db95c

Browse files
committed
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.
1 parent bb53ce9 commit 73db95c

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/bitcoin-chainstate.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -180,27 +180,6 @@ int main(int argc, char* argv[])
180180
break;
181181
}
182182

183-
if (block.vtx.empty() || !block.vtx[0]->IsCoinBase()) {
184-
std::cerr << "Block does not start with a coinbase" << std::endl;
185-
break;
186-
}
187-
188-
uint256 hash = block.GetHash();
189-
{
190-
LOCK(cs_main);
191-
const CBlockIndex* pindex = chainman.m_blockman.LookupBlockIndex(hash);
192-
if (pindex) {
193-
if (pindex->IsValid(BLOCK_VALID_SCRIPTS)) {
194-
std::cerr << "duplicate" << std::endl;
195-
break;
196-
}
197-
if (pindex->nStatus & BLOCK_FAILED_MASK) {
198-
std::cerr << "duplicate-invalid" << std::endl;
199-
break;
200-
}
201-
}
202-
}
203-
204183
{
205184
LOCK(cs_main);
206185
const CBlockIndex* pindex = chainman.m_blockman.LookupBlockIndex(block.hashPrevBlock);

0 commit comments

Comments
 (0)