Skip to content

Commit

Permalink
StakeTransactionStorage lock
Browse files Browse the repository at this point in the history
  • Loading branch information
LenyKholodov committed Mar 26, 2019
1 parent a398579 commit 32ba8d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/cryptonote_core/stake_transaction_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ StakeTransactionProcessor::StakeTransactionProcessor(Blockchain& blockchain)

const supernode_stake* StakeTransactionProcessor::find_supernode_stake(uint64_t block_number, const std::string& supernode_public_id) const
{
CRITICAL_REGION_LOCAL1(m_storage_lock);

if (!m_storage)
return nullptr;

Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_core/stake_transaction_processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class StakeTransactionProcessor
Blockchain& m_blockchain;
std::unique_ptr<StakeTransactionStorage> m_storage;
std::unique_ptr<BlockchainBasedList> m_blockchain_based_list;
epee::critical_section m_storage_lock;
mutable epee::critical_section m_storage_lock;
supernode_stakes_update_handler m_on_stakes_update;
blockchain_based_list_update_handler m_on_blockchain_based_list_update;
bool m_stakes_need_update;
Expand Down

0 comments on commit 32ba8d3

Please sign in to comment.