File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace jam::app {
2525
2626 class ChainSpecImpl : public ChainSpec {
2727 public:
28- enum class Error {
28+ enum class Error : uint8_t {
2929 MISSING_ENTRY = 1 ,
3030 MISSING_PEER_ID ,
3131 PARSER_ERROR ,
Original file line number Diff line number Diff line change 77#pragma once
88
99#include < qtils/enum_error_code.hpp>
10+ #include < cstdint>
1011
1112namespace jam ::blockchain {
1213
@@ -16,7 +17,7 @@ namespace jam::blockchain {
1617 GENESIS_BLOCK_ALREADY_EXISTS ,
1718 GENESIS_BLOCK_NOT_FOUND ,
1819 FINALIZED_BLOCK_NOT_FOUND ,
19- BLOCK_TREE_LEAVES_NOT_FOUND
20+ BLOCK_TREE_LEAVES_NOT_FOUND ,
2021 };
2122
2223}
Original file line number Diff line number Diff line change @@ -153,14 +153,9 @@ namespace jam::blockchain {
153153 virtual outcome::result<void > finalize (
154154 const BlockHash &block, const Justification &justification) = 0;
155155
156- // enum class GetChainDirection : uint8_t {
157- // ASCEND,
158- // DESCEND,
159- // };
160-
161156 /* *
162157 * Get a chain of blocks from provided block to direction of the best block
163- * @param block, from which the chain is started
158+ * @param block from which the chain is started
164159 * @param maximum number of blocks to be retrieved
165160 * @return chain or blocks or error
166161 */
Original file line number Diff line number Diff line change @@ -23,19 +23,19 @@ namespace jam::storage {
2323 * Defines common error conditions returned by storage operations,
2424 * such as missing entries, corruption, or IO failures.
2525 */
26- enum class StorageError : int { // NOLINT(performance-enum-size)
26+ enum class StorageError : uint8_t { // NOLINT(performance-enum-size)
2727
2828 OK = 0 , // /< success (no error)
2929
3030 NOT_SUPPORTED = 1 , // /< operation is not supported in storage
3131 CORRUPTION = 2 , // /< data corruption in storage
3232 INVALID_ARGUMENT = 3 , // /< invalid argument to storage
3333 IO_ERROR = 4 , // /< IO error in storage
34- NOT_FOUND = 5 , // /< entry not found in storage
34+ NOT_FOUND = 5 , // /< entry isn't found in storage
3535 DB_PATH_NOT_CREATED = 6 , // /< storage path was not created
3636 STORAGE_GONE = 7 , // /< storage instance has been uninitialized
3737
38- UNKNOWN = 1000 , // /< unknown error
38+ UNKNOWN = 255 , // /< unknown error
3939 };
4040} // namespace jam::storage
4141
You can’t perform that action at this time.
0 commit comments