src/activemasternode.cpp
// get all possible outputs for running masternode for a specific pubkey
get all possible outputs for running masternode for a specific pubkey
get all possible outputs for running masternode for a specific pubkey
vector<COutput> CActiveMasternode::SelectCoinsMasternodeForPubKey(std::string collateralAddress)
{
    CBitcoinAddress address(collateralAddress);
    CScript scriptPubKey;
    scriptPubKey.SetDestination(address.Get());
    vector<COutput> vCoins;
    vector<COutput> filteredCoins;
    pwalletMain->AvailableCoins(vCoins);
    BOOST_FOREACH(const COutput& out, vCoins)
    {
        if(out.tx->vout[out.i].scriptPubKey == scriptPubKey && out.tx->vout[out.i].nValue == 25000*COIN) { 
            filteredCoins.push_back(out);
        }
    }
    return filteredCoins;
}
vector < COutput > CActiveMasternode :: SelectCoinsMasternodeForPubKey ( std :: string collateralAddress ) { CBitcoinAddress address ( collateralAddress ) ; CScript scriptPubKey ; scriptPubKey . SetDestination ( address . Get ( ) ) ; vector < COutput > vCoins ; vector < COutput > filteredCoins ; pwalletMain -> AvailableCoins ( vCoins ) ; BOOST_FOREACH ( const COutput & out , vCoins ) { if ( out . tx -> vout [ out . i ] . scriptPubKey == scriptPubKey && out . tx -> vout [ out . i ] . nValue == 25000 * COIN ) { filteredCoins . push_back ( out ) ; } } return filteredCoins ; }
get all possible outputs for running masternode for a specific pubkey
get all possible outputs for running masternode for a specific pubkey
// Retrieve all possible outputs // Filter //exactly