mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Add BlockManagerOpts::chainparams reference
and use it in blockstorage.cpp
This commit is contained in:
parent
6c7ebcc14b
commit
facdb8b331
8 changed files with 31 additions and 9 deletions
|
|
@ -21,7 +21,10 @@ BOOST_FIXTURE_TEST_SUITE(blockmanager_tests, BasicTestingSetup)
|
|||
BOOST_AUTO_TEST_CASE(blockmanager_find_block_pos)
|
||||
{
|
||||
const auto params {CreateChainParams(ArgsManager{}, CBaseChainParams::MAIN)};
|
||||
BlockManager blockman{{}};
|
||||
node::BlockManager::Options blockman_opts{
|
||||
.chainparams = *params,
|
||||
};
|
||||
BlockManager blockman{blockman_opts};
|
||||
CChain chain {};
|
||||
// simulate adding a genesis block normally
|
||||
BOOST_CHECK_EQUAL(blockman.SaveBlockToDisk(params->GenesisBlock(), 0, chain, *params, nullptr).nPos, BLOCK_SERIALIZATION_HEADER_SIZE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue