available_coins since Available rather than Available& was used. Also the lack of the reference meant that coin.vin_left++ only incremented the copy’s variable rather than the one in the vector. The removal condition previously compared the coin’s vin.size() to vin_left, when it should have been using vout.size(). I changed the MempoolCheck bench to instead use min_ancestors of 1 rather than 5 as otherwise an underflow could occur when calling coin.ref->vout.size() - coin.vin_left. This previously did not occur since vin_left was always 0 since a copy of the coin was used. Using 1 vs 5 shouldn’t give too much of a difference since the test can still generate more than 1 (or 5) ancestors.