NewKeyPool support for int64 number of keys. #1708

pull xanatos wants to merge 2 commits into bitcoin:master from xanatos:patch-8 changing 1 files +2 −2
  1. xanatos commented at 11:55 AM on August 23, 2012: none

    nIndex is int64, nKeys is int64, it would be useless to have i an int.

  2. NewKeyPool support for int64 number of keys.
    nIndex is int64, nKeys is int64, it would be useless to have i an int.
    42725e5760
  3. Update src/wallet.cpp af4fe3a16c
  4. gmaxwell commented at 12:19 PM on August 23, 2012: contributor

    Have you tested bitcoin with more than 2^31 keys in the keypool?

  5. gavinandresen commented at 4:33 PM on August 23, 2012: contributor

    NACK.

    Better would be (pseudocode):

    int64 nUnchecked = max(GetArg(...));
    // Make sure it's not too big:
    nUnchecked = min(nUnchecked, setKeyPool.max_size());
    size_type nKeys = (size_type)nUnchecked;
    

    Or maybe even better, a type-safe numeric version of GetArg. Something like

    template typename<T>
    T GetArg(std::string arg, T default, T smallest, T largest)
    {
        int64 n = GetArg(arg, default);
        n = max(min(n, largest), smallest);
        return static_cast<T>(n);
    }
    
  6. BitcoinPullTester commented at 7:36 AM on August 24, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/af4fe3a16cbe4258929ff172303f0c19a7fd3b70 for binaries and test log.

  7. jgarzik commented at 4:02 PM on September 4, 2012: contributor

    NAK also. No demonstrated need for more than 4 billion keys etc.

  8. jgarzik closed this on Sep 4, 2012

  9. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me