Files
hpcore/src/ledger/ledger_sync.cpp
Savinda Senevirathne a4399544b9 Separate contract and ledger file system mounts. (#235)
- Creating two separate hpfs folders for contract and ledger file systems (contract_fs and ledger_fs).
- Added separate mounts for contract and ledger file systems.
- Added separate instances for contract serving and ledger serving.
- Added separate instances for contract syncing and ledger syncing.
- Modified cluster creating script to accompany folder name changes in contract folder.
2021-02-05 11:48:52 +05:30

19 lines
658 B
C++

#include "./ledger_sync.hpp"
namespace ledger
{
void ledger_sync::on_current_sync_state_acheived(const util::h32 &acheived_hash)
{
// Logic when a sync state is acheived can be performed here.
}
void ledger_sync::swap_collected_responses()
{
std::scoped_lock lock(p2p::ctx.collected_msgs.ledger_hpfs_responses_mutex);
// Move collected hpfs responses over to local candidate responses list.
if (!p2p::ctx.collected_msgs.ledger_hpfs_responses.empty())
candidate_hpfs_responses.splice(candidate_hpfs_responses.end(), p2p::ctx.collected_msgs.ledger_hpfs_responses);
}
} // namespace ledger