aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle corrupt wallets gracefully.Gavin Andresen2012-10-081-10/+31
| | | | | | | | | | | | | | | | | | | | | | | | | Corrupt wallets used to cause a DB_RUNRECOVERY uncaught exception and a crash. This commit does three things: 1) Runs a BDB verify early in the startup process, and if there is a low-level problem with the database: + Moves the bad wallet.dat to wallet.timestamp.bak + Runs a 'salvage' operation to get key/value pairs, and writes them to a new wallet.dat + Continues with startup. 2) Much more tolerant of serialization errors. All errors in deserialization are reported by tolerated EXCEPT for errors related to reading keypairs or master key records-- those are reported and then shut down, so the user can get help (or recover from a backup). 3) Adds a new -salvagewallet option, which: + Moves the wallet.dat to wallet.timestamp.bak + extracts ONLY keypairs and master keys into a new wallet.dat + soft-sets -rescan, to recreate transaction history This was tested by randomly corrupting testnet wallets using a little python script I wrote (https://gist.github.com/3812689)
* Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-011-1/+1
|
* fix a memory leak in key.cppPhilip Kaufmann2012-06-211-0/+3
| | | | | - add EC_KEY_free() in CKey::Reset() when pkey != NULL - init pkey with NULL in CKey constructor
* Encapsulate public keys in CPubKeyPieter Wuille2012-05-241-6/+6
|
* Move signature cache from CKey::Verify to CheckSig in script.cppGavin Andresen2012-05-221-65/+0
| | | | | | | | | | | More than doubles the speed of verifying already-cached signatures that use compressed pubkeys: Before: ~200 microseconds After: ~80 microseconds (no caching at all: ~3,300 microseconds per signature) Also encapsulates the signature cache code in a class and fixes a signed/unsigned comparison warning.
* Merge branch 'optimize'Gavin Andresen2012-05-221-1/+331
|\
| * Cache signature verificationsGavin Andresen2012-05-181-0/+68
| | | | | | | | | | | | | | | | | | Create a maximum-10MB signature verification result cache. This should almost double the number of transactions that can be processed on a given CPU, because before this change ECDSA signatures were verified when transactions were added to the memory pool and then again when they appeared in a block.
| * Refactor: move code from key.h to key.cppGavin Andresen2012-05-171-1/+262
| |
* | Update License in File HeadersFordy2012-05-181-1/+1
|/ | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Add GetSecret() and GetKeys() to CKeyStorePieter Wuille2011-12-171-0/+117