diff options
author | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-03-13 03:03:11 +0100 |
---|---|---|
committer | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-03-13 03:06:45 +0100 |
commit | f84aba861d26601ae4c7203daa39752e7c95cfd8 (patch) | |
tree | 2b39728d07fb370e87b05ba2fb63958e5ad8fb28 /include/Hash.hpp | |
parent | 1328d943c5016dd1662a4e46d4a408bca010cffc (diff) |
Fix add data operation not working correctly
Reminder: do not get reference to hash map value... duh
Add thread-safe logging (log is in order now!).
Store data immediately to database when WE add it instead of waiting for
response from remote peers.
TODO: Test with multiple peers (not only localhost)
Diffstat (limited to 'include/Hash.hpp')
-rw-r--r-- | include/Hash.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/Hash.hpp b/include/Hash.hpp index bd87b69..9dce168 100644 --- a/include/Hash.hpp +++ b/include/Hash.hpp @@ -3,6 +3,7 @@ #include "utils.hpp" #include <stdexcept> #include <unordered_map> +#include <unordered_set> namespace odhtdb { @@ -51,5 +52,7 @@ namespace odhtdb }; template <typename ValueType> - using MapHashKey = std::unordered_map<Hash, ValueType, HashHasher>; + using MapHash = std::unordered_map<Hash, ValueType, HashHasher>; + + using SetHash = std::unordered_set<Hash, HashHasher>; } |