From 11529c6e4f7288d8a64c488a726ee3821c7adefe Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 21 Nov 2011 02:46:28 +0100 Subject: Compressed pubkeys This patch enabled compressed pubkeys when -compressedpubkeys is passed. These are 33 bytes instead of 65, and require only marginally more CPU power when verifying. Compressed pubkeys have a different corresponding address, so it is determined at generation. When -compressedpubkeys is given, all newly generated addresses will use a compressed key, while older/other addresses keep using normal keys. Unpatched clients will relay and verify these transactions. --- src/db.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/db.cpp') diff --git a/src/db.cpp b/src/db.cpp index f43b2a565..b3bbaca19 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -860,12 +860,14 @@ int CWalletDB::LoadWallet(CWallet* pwallet) { CPrivKey pkey; ssValue >> pkey; + key.SetPubKey(vchPubKey); key.SetPrivKey(pkey); } else { CWalletKey wkey; ssValue >> wkey; + key.SetPubKey(vchPubKey); key.SetPrivKey(wkey.vchPrivKey); } if (!pwallet->LoadKey(key)) -- cgit v1.2.3