aboutsummaryrefslogtreecommitdiff
path: root/src/test/skiplist_tests.cpp
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-07-11 21:37:53 +1200
committerMeshCollider <dobsonsa68@gmail.com>2017-09-08 10:36:26 +1200
commit592404f03f2b734351d734f0c9ca1fdce997321b (patch)
tree463d2c31825679c76f11445366b6736702b2824c /src/test/skiplist_tests.cpp
parentd81dccf191a48a6b59c3747d7b4ccbe3535dde40 (diff)
Changing &vec[0] to vec.data(), what 9804 missed
Diffstat (limited to 'src/test/skiplist_tests.cpp')
-rw-r--r--src/test/skiplist_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp
index e3654e67ad..164cbd873f 100644
--- a/src/test/skiplist_tests.cpp
+++ b/src/test/skiplist_tests.cpp
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(skiplist_test)
BOOST_CHECK(vIndex[SKIPLIST_LENGTH - 1].GetAncestor(from) == &vIndex[from]);
BOOST_CHECK(vIndex[from].GetAncestor(to) == &vIndex[to]);
- BOOST_CHECK(vIndex[from].GetAncestor(0) == &vIndex[0]);
+ BOOST_CHECK(vIndex[from].GetAncestor(0) == vIndex.data());
}
}
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(getlocator_test)
for (unsigned int i=0; i<vBlocksSide.size(); i++) {
vHashSide[i] = ArithToUint256(i + 50000 + (arith_uint256(1) << 128)); // Add 1<<128 to the hashes, so GetLow64() still returns the height.
vBlocksSide[i].nHeight = i + 50000;
- vBlocksSide[i].pprev = i ? &vBlocksSide[i - 1] : &vBlocksMain[49999];
+ vBlocksSide[i].pprev = i ? &vBlocksSide[i - 1] : (vBlocksMain.data()+49999);
vBlocksSide[i].phashBlock = &vHashSide[i];
vBlocksSide[i].BuildSkip();
BOOST_CHECK_EQUAL((int)UintToArith256(vBlocksSide[i].GetBlockHash()).GetLow64(), vBlocksSide[i].nHeight);