aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/key.h b/src/key.h
index 14024e6ec0..8ef6c51b14 100644
--- a/src/key.h
+++ b/src/key.h
@@ -7,10 +7,10 @@
#ifndef BITCOIN_KEY_H
#define BITCOIN_KEY_H
-#include "pubkey.h"
-#include "serialize.h"
-#include "support/allocators/secure.h"
-#include "uint256.h"
+#include <pubkey.h>
+#include <serialize.h>
+#include <support/allocators/secure.h>
+#include <uint256.h>
#include <stdexcept>
#include <vector>
@@ -62,11 +62,6 @@ public:
keydata.resize(32);
}
- //! Destructor (again necessary because of memlocking).
- ~CKey()
- {
- }
-
friend bool operator==(const CKey& a, const CKey& b)
{
return a.fCompressed == b.fCompressed &&
@@ -178,6 +173,8 @@ struct CExtKey {
{
unsigned int len = ::ReadCompactSize(s);
unsigned char code[BIP32_EXTKEY_SIZE];
+ if (len != BIP32_EXTKEY_SIZE)
+ throw std::runtime_error("Invalid extended key size\n");
s.read((char *)&code[0], len);
Decode(code);
}