nIndex is int64, nKeys is int64, it would be useless to have i an int.
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-
xanatos commented at 11:55 AM on August 23, 2012: none
-
42725e5760
NewKeyPool support for int64 number of keys.
nIndex is int64, nKeys is int64, it would be useless to have i an int.
-
Update src/wallet.cpp af4fe3a16c
-
gmaxwell commented at 12:19 PM on August 23, 2012: contributor
Have you tested bitcoin with more than 2^31 keys in the keypool?
-
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); } -
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.
-
jgarzik commented at 4:02 PM on September 4, 2012: contributor
NAK also. No demonstrated need for more than 4 billion keys etc.
- jgarzik closed this on Sep 4, 2012
- DrahtBot locked this on Sep 8, 2021