CSecret/CKey -> CKey/CPubKey split/refactor

This commit is contained in:
Pieter Wuille
2013-05-01 06:52:05 +02:00
committed by Pieter Wuille
parent 5d891489ab
commit dfa23b94c2
26 changed files with 578 additions and 609 deletions

View File

@@ -73,14 +73,13 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
CBitcoinSecret vchSecret;
BOOST_CHECK(vchSecret.SetString(strSecret));
CKey key;
bool fCompressed;
CSecret secret = vchSecret.GetSecret(fCompressed);
key.SetSecret(secret, fCompressed);
CKey key = vchSecret.GetKey();
CPubKey pubkey = key.GetPubKey();
vector<unsigned char> vchPubKey(pubkey.begin(), pubkey.end());
CBloomFilter filter(2, 0.001, 0, BLOOM_UPDATE_ALL);
filter.insert(key.GetPubKey().Raw());
uint160 hash = key.GetPubKey().GetID();
filter.insert(vchPubKey);
uint160 hash = pubkey.GetID();
filter.insert(vector<unsigned char>(hash.begin(), hash.end()));
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);