Pieter Wuille 4addb2c066 Refactor keytime/metadata and wallet encryption bugfix
Refactor keytime:
* Key metadata is kept in a CWallet::mapKeyMetadata (std::map<CKeyId,CKeyMetadata>).
* When generating a new key, time is put in that map, and new key is written.
* AddKeyPubKey and AddCryptedKey do not take a creation time argument, but instead
  pull it from that map, if it exists there.

Bugfix:
* AddKeyPubKey and AddCryptedKey in CWallet didn't override the CKeyStore
  definition anymore. This is fixed, as they no longed need the nCreationTime
  argument now.

Also a few related other changes:
* Metadata can be overwritten.
* Only GenerateNewKey calls GetTime(), as it's the only place where we know for
  sure a key was not constructed earlier.
* When the nTimeFirstKey is known to be inaccurate, it is set to the value 1
  (instead of 0, which would mean unknown).
* Use CPubKey instead of std::vector<unsigned char> where possible.
2013-06-20 01:31:18 +02:00
..
2012-04-27 10:14:33 -04:00
2012-12-18 21:39:29 +01:00
2013-03-19 15:16:30 -04:00
2013-04-12 12:17:28 +02:00
2013-05-30 04:43:51 +02:00
2013-06-11 05:06:02 +02:00
2013-06-05 20:36:10 -07:00
2013-06-05 20:36:10 -07:00
2013-05-30 05:18:42 +02:00
2013-05-30 05:20:23 +02:00
2013-01-30 04:30:02 +01:00
2013-06-11 23:29:41 +02:00
2013-06-06 00:04:33 -07:00
2013-05-01 17:21:43 +02:00
2013-05-07 20:03:17 -05:00