Add missing RocksDB table locks for rep_weights table
This commit is contained in:
parent
69f147991c
commit
f99ba3e852
3 changed files with 4 additions and 4 deletions
|
|
@ -282,7 +282,7 @@ auto nano::block_processor::process_batch (nano::unique_lock<nano::mutex> & lock
|
|||
processed_batch_t processed;
|
||||
|
||||
auto scoped_write_guard = write_database_queue.wait (nano::writer::process_batch);
|
||||
auto transaction (node.store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending }));
|
||||
auto transaction (node.store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending, tables::rep_weights }));
|
||||
nano::timer<std::chrono::milliseconds> timer_l;
|
||||
|
||||
lock_a.lock ();
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ nano::node::node (boost::asio::io_context & io_ctx_a, std::filesystem::path cons
|
|||
|
||||
if (!is_initialized && !flags.read_only)
|
||||
{
|
||||
auto const transaction (store.tx_begin_write ({ tables::accounts, tables::blocks, tables::confirmation_height, tables::frontiers }));
|
||||
auto const transaction (store.tx_begin_write ({ tables::accounts, tables::blocks, tables::confirmation_height, tables::frontiers, tables::rep_weights }));
|
||||
// Store was empty meaning we just created it, add the genesis block
|
||||
store.initialize (transaction, ledger.cache, ledger.constants);
|
||||
}
|
||||
|
|
@ -558,7 +558,7 @@ void nano::node::process_active (std::shared_ptr<nano::block> const & incoming)
|
|||
|
||||
nano::block_status nano::node::process (std::shared_ptr<nano::block> block)
|
||||
{
|
||||
auto const transaction = store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending });
|
||||
auto const transaction = store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending, tables::rep_weights });
|
||||
return process (transaction, block);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ nano::account nano::test::random_account ()
|
|||
|
||||
bool nano::test::process (nano::node & node, std::vector<std::shared_ptr<nano::block>> blocks)
|
||||
{
|
||||
auto const transaction = node.store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending });
|
||||
auto const transaction = node.store.tx_begin_write ({ tables::accounts, tables::blocks, tables::frontiers, tables::pending, tables::rep_weights });
|
||||
for (auto & block : blocks)
|
||||
{
|
||||
auto result = node.process (transaction, block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue