https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
{
    
    if (IsImmatureCoinBase())
        return 0;
    CAmount credit = 0;
    if (filter & ISMINE_SPENDABLE) {
        
        credit += GetCachableAmount(CREDIT, ISMINE_SPENDABLE);
    }
    if (filter & ISMINE_WATCH_ONLY) {
        credit += GetCachableAmount(CREDIT, ISMINE_WATCH_ONLY);
    }
    return credit;
}
CAmount CWalletTx::GetImmatureCredit(bool fUseCache) const
{
    if (IsImmatureCoinBase() && IsInMainChain()) {
        return GetCachableAmount(IMMATURE_CREDIT, ISMINE_SPENDABLE, !fUseCache);
    }
    return 0;
}
CAmount CWalletTx::GetAvailableCredit(bool fUseCache, const isminefilter& filter) const