<<  >> (p.49)
    Author Topic: Vanitygen: Vanity bitcoin address generator/miner [v0.22]  (Read 1155142 times)
    wtfvanity
    Hero Member
    *****
    Offline

    Activity: 504
    Merit: 500


    WTF???


    View Profile
    March 13, 2013, 10:45:44 PM
     #961

    Can anyone explain what this bit of code is doing? (in pattern.c of the source)

    Code:
    if ((b58pow - (p - zero_prefix)) < 6) {
    /*
    * Do not allow the prefix to constrain the
    * check value, this is ridiculous.
    */
    fprintf(stderr, "Prefix '%s' is too long\n", pfx);
    goto out;
    }

    It seems I'm hanging on this piece when trying to generate an address over 28 characters (And yes, yes, I realize it's a pipe dream to ever find anything close to that - let me have my fun!)

    A bitcoin address has a checksum to make sure that it is a valid address. If you are generating an address that is 30 characters long, the possibilities of getting your string and the checksum are zilch.

    Waste a couple of weeks looking for a 12 character address before you go for ones near 30.

    https://en.bitcoin.it/wiki/Address

    Oh yeah, I understand that an address will never be found - finding the address is not my goal. I'm simply asking if the code can be modified to handle a larger string, and if so how?

    Change the < 6 to some smaller number.

              WTF!     Don't Click Here              
              .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
Page 48
Viewing Page: 49