Changeset View
Changeset View
Standalone View
Standalone View
src/test/pmt_tests.cpp
Show All 23 Lines | void Damage() { | ||||
int bit = InsecureRandBits(8); | int bit = InsecureRandBits(8); | ||||
*(vHash[n].begin() + (bit >> 3)) ^= 1 << (bit & 7); | *(vHash[n].begin() + (bit >> 3)) ^= 1 << (bit & 7); | ||||
} | } | ||||
}; | }; | ||||
BOOST_FIXTURE_TEST_SUITE(pmt_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(pmt_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(pmt_test1) { | BOOST_AUTO_TEST_CASE(pmt_test1) { | ||||
SeedInsecureRand(false); | |||||
static const unsigned int nTxCounts[] = {1, 4, 7, 17, 56, 100, | static const unsigned int nTxCounts[] = {1, 4, 7, 17, 56, 100, | ||||
127, 256, 312, 513, 1000, 4095}; | 127, 256, 312, 513, 1000, 4095}; | ||||
for (int i = 0; i < 12; i++) { | for (int i = 0; i < 12; i++) { | ||||
unsigned int nTx = nTxCounts[i]; | unsigned int nTx = nTxCounts[i]; | ||||
// build a block with some dummy transactions | // build a block with some dummy transactions | ||||
CBlock block; | CBlock block; | ||||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |