No description provided.
Total money limit test #3707
pull sipa wants to merge 1 commits into bitcoin:master from sipa:moneyrange changing 2 files +18 −0-
sipa commented at 12:56 AM on February 19, 2014: member
-
Total money limit test 933e9a6a46
-
BitcoinPullTester commented at 1:25 AM on February 19, 2014: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/933e9a6a4603f4e23e7572397f30fbb9628bf3c6 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
-
in src/test/main_tests.cpp:None in 933e9a6a46
7 | + 8 | +BOOST_AUTO_TEST_CASE(subsidy_limit_test) 9 | +{ 10 | + uint64_t nSum = 0; 11 | + for (int nHeight = 0; nHeight < 7000000; nHeight += 1000) { 12 | + nSum += GetBlockValue(nHeight, 0) * 1000;
luke-jr commented at 1:40 AM on February 19, 2014:This looks like it can be easily broken by an overflow :(
il--ya commented at 3:04 AM on February 19, 2014:// that would prevent overflow uint64_t subsidy = GetBlockValue(nHeight, 0); BOOST_CHECK(subsidy < 50 * COIN); nSum += subsidy * 1000;
laanwj commented at 9:10 AM on February 19, 2014:More like
uint64_t subsidy = GetBlockValue(nHeight, 0) * 1000; BOOST_CHECK((nSum + subsidy) >= nSum); nSum += subsidy;It's a pity that C++ still doesn't have a way to flag or raise exceptions on overflow.
laanwj closed this on Feb 28, 2014DrahtBot locked this on Sep 8, 2021Contributors
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-13 21:15 UTC
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-13 21:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me