Removing unnecessary checks for is_dev_network in confirmation height process and remove the subsequently unused instance of nano::network_params that was instantiated statically.
This commit is contained in:
parent
02d8673de3
commit
49d66153fa
4 changed files with 2 additions and 5 deletions
|
|
@ -128,7 +128,6 @@ void nano::confirmation_height_processor::run (confirmation_height_mode mode_a)
|
|||
else
|
||||
{
|
||||
// Pausing is only utilised in some tests to help prevent it processing added blocks until required.
|
||||
debug_assert (network_params.network.is_dev_network ());
|
||||
original_block = nullptr;
|
||||
condition.wait (lk);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ private:
|
|||
nano::write_database_queue & write_database_queue;
|
||||
/** The maximum amount of blocks to write at once. This is dynamically modified by the bounded processor based on previous write performance **/
|
||||
uint64_t batch_write_size{ 16384 };
|
||||
nano::network_params network_params;
|
||||
|
||||
confirmation_height_unbounded unbounded_processor;
|
||||
confirmation_height_bounded bounded_processor;
|
||||
|
|
|
|||
|
|
@ -381,8 +381,8 @@ void nano::confirmation_height_unbounded::cement_blocks (nano::write_guard & sco
|
|||
if (pending.height > confirmation_height)
|
||||
{
|
||||
auto block = ledger.store.block.get (transaction, pending.hash);
|
||||
debug_assert (network_params.network.is_dev_network () || ledger.pruning || block != nullptr);
|
||||
debug_assert (network_params.network.is_dev_network () || ledger.pruning || block->sideband ().height == pending.height);
|
||||
debug_assert (ledger.pruning || block != nullptr);
|
||||
debug_assert (ledger.pruning || block->sideband ().height == pending.height);
|
||||
|
||||
if (!block)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ private:
|
|||
void collect_unconfirmed_receive_and_sources_for_account (uint64_t, uint64_t, std::shared_ptr<nano::block> const &, nano::block_hash const &, nano::account const &, nano::read_transaction const &, std::vector<receive_source_pair> &, std::vector<nano::block_hash> &, std::vector<nano::block_hash> &, std::shared_ptr<nano::block> original_block);
|
||||
void prepare_iterated_blocks_for_cementing (preparation_data &);
|
||||
|
||||
nano::network_params network_params;
|
||||
nano::ledger & ledger;
|
||||
nano::write_database_queue & write_database_queue;
|
||||
std::chrono::milliseconds batch_separate_pending_min_time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue