mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Added IsValidLocallyMethod overload which returns masternode status flag
This commit is contained in:
parent
a3277ea422
commit
35a45097ed
@ -1113,6 +1113,14 @@ void CGovernanceObject::UpdateLocalValidity(const CBlockIndex *pCurrentBlockInde
|
||||
|
||||
bool CGovernanceObject::IsValidLocally(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral)
|
||||
{
|
||||
bool fMissingMasternode = false;
|
||||
|
||||
return IsValidLocally(pindex, strError, fMissingMasternode, fCheckCollateral);
|
||||
}
|
||||
|
||||
bool CGovernanceObject::IsValidLocally(const CBlockIndex* pindex, std::string& strError, bool& fMissingMasternode, bool fCheckCollateral)
|
||||
{
|
||||
fMissingMasternode = false;
|
||||
if(!pindex) {
|
||||
strError = "Tip is NULL";
|
||||
return true;
|
||||
@ -1147,6 +1155,7 @@ bool CGovernanceObject::IsValidLocally(const CBlockIndex* pindex, std::string& s
|
||||
std::string strOutpoint = vinMasternode.prevout.ToStringShort();
|
||||
masternode_info_t infoMn = mnodeman.GetMasternodeInfo(vinMasternode);
|
||||
if(!infoMn.fInfoValid) {
|
||||
fMissingMasternode = true;
|
||||
strError = "Masternode not found: " + strOutpoint;
|
||||
return false;
|
||||
}
|
||||
|
@ -481,6 +481,8 @@ public:
|
||||
|
||||
bool IsValidLocally(const CBlockIndex* pindex, std::string& strError, bool fCheckCollateral);
|
||||
|
||||
bool IsValidLocally(const CBlockIndex* pindex, std::string& strError, bool& fMissingMasternode, bool fCheckCollateral);
|
||||
|
||||
/// Check the collateral transaction for the budget proposal/finalized budget
|
||||
bool IsCollateralValid(std::string& strError);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user