-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcrisp_tests.cpp
More file actions
53 lines (38 loc) · 1.06 KB
/
crisp_tests.cpp
File metadata and controls
53 lines (38 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <boost/test/unit_test.hpp>
#include "main.h"
#include "miner.h"
CBlockIndex genesisBlockIndex;
CBlockIndex tipBlockIndex;
BOOST_AUTO_TEST_SUITE(crisp_tests)
BOOST_AUTO_TEST_CASE(functional_simple)
{
//create some blocks
CBlockIndex blockIndex;
//CBlock block = new CBlock();
blockIndex.pnext = &blockIndex;
blockIndex.pprev = &blockIndex;
blockIndex.phashBlock = new uint256();
blockIndex.nHeight = 1;
CPubKey pubKey = CPubKey();
pindexBest = &blockIndex;
/*
for( int i = 0; i < 100; i++)
{
CBlock* b = CreateNewBlock(pubKey, false, 0);
}
*/
std::vector<CBlock> blockChain;
for(int i = 0; i < 100; i++)
{
CBlock block;
block.nBits = 1;
blockChain.push_back(block);
}
BOOST_CHECK(blockIndex.pnext->pnext->pnext->nHeight == 1);
//delete block;
//delete blockIndex;
}
BOOST_AUTO_TEST_CASE(performance_simple)
{
}
BOOST_AUTO_TEST_SUITE_END()