Merge #413: [backport] Fix crash bug with duplicate inputs within a transaction

05c8066 Fix crash bug with duplicate inputs within a transaction (Suhas Daftuar)
This commit is contained in:
Jorge Timón 2018-09-19 22:27:43 +02:00
commit 1920d8480e
No known key found for this signature in database
GPG key ID: A4F5D141C01A0387

View file

@ -3859,7 +3859,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
// Check transactions
for (const auto& tx : block.vtx)
if (!CheckTransaction(*tx, state, false))
if (!CheckTransaction(*tx, state, true))
return state.Invalid(false, state.GetRejectCode(), state.GetRejectReason(),
strprintf("Transaction check failed (tx hash %s) %s", tx->GetHash().ToString(), state.GetDebugMessage()));