-
Notifications
You must be signed in to change notification settings - Fork 33
/
blob.cpp
28 lines (21 loc) · 627 Bytes
/
blob.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
* Copyright Quadrivium LLC
* All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*/
#include "common/blob.hpp"
OUTCOME_CPP_DEFINE_CATEGORY(kagome::common, BlobError, e) {
using kagome::common::BlobError;
switch (e) {
case BlobError::INCORRECT_LENGTH:
return "Input string has incorrect length, not matching the blob size";
}
return "Unknown error";
}
namespace kagome::common {
// explicit instantiations for the most frequently used blobs
template class Blob<8ul>;
template class Blob<16ul>;
template class Blob<32ul>;
template class Blob<64ul>;
} // namespace kagome::common