forked from nanocurrency/nano-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
nano::store::writer
enum to a dedicated header
- Loading branch information
1 parent
d5b3379
commit 2d3668d
Showing
5 changed files
with
32 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <nano/lib/enum_util.hpp> | ||
#include <nano/store/writers.hpp> | ||
|
||
std::string_view nano::store::to_string (nano::store::writer writer) | ||
{ | ||
return nano::enum_util::name (writer); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
namespace nano::store | ||
{ | ||
/** Distinct areas write locking is done, order is irrelevant */ | ||
enum class writer | ||
{ | ||
generic, | ||
node, | ||
block_processor, | ||
confirmation_height, | ||
pruning, | ||
voting_final, | ||
bounded_backlog, | ||
online_weight, | ||
testing // Used in tests to emulate a write lock | ||
}; | ||
|
||
std::string_view to_string (writer); | ||
} |