aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-18 15:06:32 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-18 15:42:38 +0100
commit38067c18f8b54c7121643fa3291ffe81b6eefef1 (patch)
treefce09f2e449d290386e5c392fc3f4c61229ca83a /src/wallet.cpp
parent9976cf070fdda61afa30cd65ef5bcddad4f43e81 (diff)
Make compressed pubkeys require 0.6.0
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index da64aa5103..8a33041a1c 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -17,9 +17,16 @@ using namespace std;
std::vector<unsigned char> CWallet::GenerateNewKey()
{
+ bool fCompressed = true; // default to compressed public keys
+
RandAddSeedPerfmon();
CKey key;
- key.MakeNewKey();
+ key.MakeNewKey(fCompressed);
+
+ // Compressed public keys were introduced in version 0.6.0
+ if (fCompressed)
+ SetMinVersion(59900);
+
if (!AddKey(key))
throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed");
return key.GetPubKey();