Add GetValidMNByService to CDeterministicMNList

This commit is contained in:
Alexander Block 2019-04-09 09:09:18 +02:00
parent 5d94d6bdfd
commit 5bebdda71f
2 changed files with 6 additions and 0 deletions

View File

@ -168,6 +168,11 @@ CDeterministicMNCPtr CDeterministicMNList::GetValidMNByCollateral(const COutPoin
return dmn;
}
CDeterministicMNCPtr CDeterministicMNList::GetValidMNByService(const CService& service) const
{
return GetUniquePropertyMN(service);
}
static int CompareByLastPaid_GetHeight(const CDeterministicMN& dmn)
{
int height = dmn.pdmnState->nLastPaidHeight;

View File

@ -306,6 +306,7 @@ public:
CDeterministicMNCPtr GetMNByOperatorKey(const CBLSPublicKey& pubKey);
CDeterministicMNCPtr GetMNByCollateral(const COutPoint& collateralOutpoint) const;
CDeterministicMNCPtr GetValidMNByCollateral(const COutPoint& collateralOutpoint) const;
CDeterministicMNCPtr GetValidMNByService(const CService& service) const;
CDeterministicMNCPtr GetMNPayee() const;
/**