https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
if (nDepth == 0 && wtx.mapValue.count("replaces_txid")) {
            safeTx = false;
        }
        
        
        
        
        
        
        
        
        if (nDepth == 0 && wtx.mapValue.count("replaced_by_txid")) {
            safeTx = false;
        }
        if (fOnlySafe && !safeTx) {
            continue;
        }
        if (nDepth < min_depth || nDepth > max_depth) {
            continue;
        }
        for (unsigned int i = 0; i < wtx.tx->vout.size(); i++) {
            
            if (coinControl && !coinControl->m_add_inputs && !coinControl->IsSelected(COutPoint(entry.first, i))) {
                continue;
            }
            if (wtx.tx->vout[i].nValue < nMinimumAmount || wtx.tx->vout[i].nValue > nMaximumAmount)
                continue;
            if (coinControl && coinControl->HasSelected() && !coinControl->fAllowOtherInputs && !coinControl->IsSelected(COutPoint(entry.first, i)))
                continue;