Fix a very ancient bug from mid 2015 (#2021)

Introduced in c701839a43 (diff-2e2ff25b7bc057a741bf93c35ae3b624R42) (committed on 10 Jul 2015). Survived all the refactoring for almost 3 years and was revealed by 525c049316 (diff-49ff8fea774f647034a130c40d4f3c65R519) (as a part of https://github.com/dashpay/dash/pull/1856) by causing silent crashes on multiple nodes (testnet). v0.12.2.x and earlier branches/versions aren't affected, they simply print meaningless log entry.
This commit is contained in:
UdjinM6 2018-04-05 15:34:40 +03:00 committed by GitHub
parent a0874b72a9
commit eecc692236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -546,7 +546,7 @@ bool CGovernanceObject::IsCollateralValid(std::string& strError, bool& fMissingC
// RETRIEVE TRANSACTION IN QUESTION // RETRIEVE TRANSACTION IN QUESTION
if(!GetTransaction(nCollateralHash, txCollateral, Params().GetConsensus(), nBlockHash, true)){ if(!GetTransaction(nCollateralHash, txCollateral, Params().GetConsensus(), nBlockHash, true)){
strError = strprintf("Can't find collateral tx %s", txCollateral->ToString()); strError = strprintf("Can't find collateral tx %s", nCollateralHash.ToString());
LogPrintf("CGovernanceObject::IsCollateralValid -- %s\n", strError); LogPrintf("CGovernanceObject::IsCollateralValid -- %s\n", strError);
return false; return false;
} }