diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2011-11-21 02:46:28 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-01-09 15:18:19 +0100 |
commit | 11529c6e4f7288d8a64c488a726ee3821c7adefe (patch) | |
tree | 0f727a647b327687eb7894d824eb47d3578dfb92 /src/db.cpp | |
parent | 1684f98b27de9323d24ee4489af54dd84083956a (diff) |
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.
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.cpp b/src/db.cpp index f43b2a5656..b3bbaca19f 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)) |