mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 11:29:23 +00:00
Updated tests
This commit is contained in:
parent
9e439044de
commit
a7496dbc02
3 changed files with 6 additions and 1 deletions
|
@ -92,6 +92,7 @@ TEST(block_template, update)
|
|||
|
||||
tpl.update(data, mempool, &wallet);
|
||||
|
||||
ASSERT_EQ(b->m_sidechainId, H("272a7eea0b804cf24427528977d221850d0ee06c26e935219a75f180cfbfc7f3"));
|
||||
ASSERT_EQ(b->m_transactions.size(), 203);
|
||||
|
||||
for (size_t i = 1; i < b->m_transactions.size(); ++i) {
|
||||
|
|
|
@ -160,7 +160,7 @@ TEST(pool_block, verify)
|
|||
ASSERT_EQ(b.deserialize(p, n, sidechain, nullptr, false), 0);
|
||||
p += n;
|
||||
|
||||
sidechain.add_block(b);
|
||||
ASSERT_TRUE(sidechain.add_block(b));
|
||||
ASSERT_TRUE(sidechain.find_block(b.m_sidechainId) != nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,10 @@ TEST(util, bsr)
|
|||
for (uint64_t i = 0, x = 1; i <= 63; ++i, x <<= 1) {
|
||||
ASSERT_EQ(bsr(x), i);
|
||||
ASSERT_EQ(bsr_reference(x), i);
|
||||
|
||||
const uint64_t y = x | (x - 1);
|
||||
ASSERT_EQ(bsr(y), i);
|
||||
ASSERT_EQ(bsr_reference(y), i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue