From 38067c18f8b54c7121643fa3291ffe81b6eefef1 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 18 Feb 2012 15:06:32 +0100 Subject: Make compressed pubkeys require 0.6.0 --- src/wallet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/wallet.cpp') 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 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(); -- cgit v1.2.3