johguse / profanity

Vanity address generator for Ethereum
834 stars 324 forks source link

output multiple matches at same score level #41

Open allenday opened 3 years ago

allenday commented 3 years ago

for example, keep outputting at score=15 until score=16 is achieved

AK42 commented 3 years ago

I'd like to do that too, the screenshot example shows that behaviour but I have no idea how to reproduce it.

gpxl-dev commented 2 years ago

@johguse are you still maintaining this library? Seems like this could potentially be a quick change if you know what you're looking for!

jaggedsoft commented 2 years ago

I haven't tested this, but in theory you could edit profanity.cl and replace profanity_result_update:

void profanity_result_update(const size_t id, __global const uchar * const hash, __global result * const pResult, const uchar score, const uchar scoreMax) {
    if (score && score > scoreMax) {
        //uchar hasResult = atomic_inc(&pResult[score].found); // NOTE: If "too many" results are found it'll wrap around to 0 again and overwrite last result. Only relevant if global worksize exceeds MAX(uint).

        // Save only one result for each score, the first.
        //if (hasResult == 0) {
            pResult[score].foundId = id;

            for (int i = 0; i < 20; ++i) {
                pResult[score].foundHash[i] = hash[i];
            }
        //}
    }
}