aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain_db.h
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-10-23 19:47:36 -0400
committerwarptangent <warptangent@inbox.com>2015-01-04 19:01:10 -0800
commita0af217d9ad42ab21d8e79987d8a07eeb457045d (patch)
tree09652b0822ffcd3cc6a97ab012b9652d9b701802 /src/cryptonote_core/blockchain_db.h
parentParts of LMDB impl of BlockchainDB done and working (diff)
downloadmonero-a0af217d9ad42ab21d8e79987d8a07eeb457045d.tar.xz
Adding block data to LMDB BlockchainDB coded
Still needs testing (and need to write a few more unit tests), but everything should be there. Lots of unfortunate duplication, but...well, I can't see a way around it using LMDB. A couple of other minor changes in this commit, only slightly relevant.
Diffstat (limited to 'src/cryptonote_core/blockchain_db.h')
-rw-r--r--src/cryptonote_core/blockchain_db.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain_db.h b/src/cryptonote_core/blockchain_db.h
index b3c73a0d8..f59678869 100644
--- a/src/cryptonote_core/blockchain_db.h
+++ b/src/cryptonote_core/blockchain_db.h
@@ -126,6 +126,8 @@
* TX_DNE
* TX_EXISTS
* OUTPUT_DNE
+ * OUTPUT_EXISTS
+ * KEY_IMAGE_EXISTS
*/
namespace cryptonote
@@ -302,7 +304,7 @@ class OUTPUT_DNE : public std::exception
private:
std::string m;
public:
- OUTPUT_DNE() : m("The transaction requested does not exist") { }
+ OUTPUT_DNE() : m("The output requested does not exist!") { }
OUTPUT_DNE(const char* s) : m(s) { }
virtual ~OUTPUT_DNE() { }
@@ -313,6 +315,38 @@ class OUTPUT_DNE : public std::exception
}
};
+class OUTPUT_EXISTS : public std::exception
+{
+ private:
+ std::string m;
+ public:
+ OUTPUT_EXISTS() : m("The output to be added already exists!") { }
+ OUTPUT_EXISTS(const char* s) : m(s) { }
+
+ virtual ~OUTPUT_EXISTS() { }
+
+ const char* what() const throw()
+ {
+ return m.c_str();
+ }
+};
+
+class KEY_IMAGE_EXISTS : public std::exception
+{
+ private:
+ std::string m;
+ public:
+ KEY_IMAGE_EXISTS() : m("The spent key image to be added already exists!") { }
+ KEY_IMAGE_EXISTS(const char* s) : m(s) { }
+
+ virtual ~KEY_IMAGE_EXISTS() { }
+
+ const char* what() const throw()
+ {
+ return m.c_str();
+ }
+};
+
/***********************************
* End of Exception Definitions
***********************************/