https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
std::map<CScript, std::vector<OutputGroup>> spk_to_groups_map;
    for (const auto& output : outputs) {
        
        if (!output.fSpendable) continue;
        size_t ancestors, descendants;
        chain().getTransactionAncestry(output.tx->GetHash(), ancestors, descendants);
        CInputCoin input_coin = output.GetInputCoin();
        CScript spk = input_coin.txout.scriptPubKey;
        std::vector<OutputGroup>& groups = spk_to_groups_map[spk];
        if (groups.size() == 0) {
            
            groups.emplace_back(effective_feerate, long_term_feerate);
        }
        
        
        OutputGroup* group = &groups.back();
        
        
        if (group->m_outputs.size() >= OUTPUT_GROUP_MAX_ENTRIES) {
            
            groups.emplace_back(effective_feerate, long_term_feerate);
            group = &groups.back();
        }
        
        group->Insert(input_coin, output.nDepth, output.tx->IsFromMe(ISMINE_ALL), ancestors, descendants, positive_only);
    }