diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-26 16:22:57 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-27 22:46:41 +0100 |
commit | 0a7421b60716051359f821b2540073ad27c141d3 (patch) | |
tree | c4ba509b1849ca571f0516b08670a49c0cf68ce0 /tests/unit_tests/hardfork.cpp | |
parent | hardfork: remove use of GNU extension for initializing object (diff) | |
download | monero-0a7421b60716051359f821b2540073ad27c141d3.tar.xz |
hardfork: rescan speedup
Add a block height before which version 1 is assumed
Use DB transactions
Diffstat (limited to 'tests/unit_tests/hardfork.cpp')
-rw-r--r-- | tests/unit_tests/hardfork.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp index a476eca22..25d03b703 100644 --- a/tests/unit_tests/hardfork.cpp +++ b/tests/unit_tests/hardfork.cpp @@ -196,7 +196,7 @@ TEST(states, Success) TEST(steps_asap, Success) { TestDB db; - HardFork hf(db, 1,1,1,1); + HardFork hf(db, 1,0,1,1,1); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -225,7 +225,7 @@ TEST(steps_asap, Success) TEST(steps_1, Success) { TestDB db; - HardFork hf(db, 1,1,1,1); + HardFork hf(db, 1,0,1,1,1); ASSERT_TRUE(hf.add(1, 0, 0)); for (int n = 1 ; n < 10; ++n) @@ -246,7 +246,7 @@ TEST(reorganize, Same) { for (int history = 1; history <= 12; ++history) { TestDB db; - HardFork hf(db, 1, 1, 1, history, 100); + HardFork hf(db, 1, 0, 1, 1, history, 100); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -276,7 +276,7 @@ TEST(reorganize, Changed) { int history = 4; TestDB db; - HardFork hf(db, 1, 1, 1, 4, 100); + HardFork hf(db, 1, 0, 1, 1, 4, 100); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -325,7 +325,7 @@ TEST(voting, threshold) { for (int threshold = 87; threshold <= 88; ++threshold) { TestDB db; - HardFork hf(db, 1, 1, 1, 8, threshold); + HardFork hf(db, 1, 0, 1, 1, 8, threshold); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -353,7 +353,7 @@ TEST(voting, threshold) TEST(new_blocks, denied) { TestDB db; - HardFork hf(db, 1, 1, 1, 4, 50); + HardFork hf(db, 1, 0, 1, 1, 4, 50); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -379,7 +379,7 @@ TEST(new_blocks, denied) TEST(new_version, early) { TestDB db; - HardFork hf(db, 1, 1, 1, 4, 50); + HardFork hf(db, 1, 0, 1, 1, 4, 50); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); @@ -402,7 +402,7 @@ TEST(new_version, early) TEST(reorganize, changed) { TestDB db; - HardFork hf(db, 1, 1, 1, 4, 50); + HardFork hf(db, 1, 0, 1, 1, 4, 50); // v h t ASSERT_TRUE(hf.add(1, 0, 0)); |