aboutsummaryrefslogtreecommitdiff
path: root/src/test/bloom_tests.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2013-05-30 07:55:25 -0700
committerJeff Garzik <[email protected]>2013-05-30 07:55:25 -0700
commite2f42142a03fa817a7fe6529fc1d55ef2d016352 (patch)
treea298361e95260b418a2bf82665390441e954954e /src/test/bloom_tests.cpp
parentMerge pull request #2693 from jgarzik/checkpoint-bool (diff)
parentMake signature cache store CPubKeys (diff)
downloaddiscoin-e2f42142a03fa817a7fe6529fc1d55ef2d016352.tar.xz
discoin-e2f42142a03fa817a7fe6529fc1d55ef2d016352.zip
Merge pull request #2600 from sipa/keyrefactor
Refactor key.cpp/.h
Diffstat (limited to 'src/test/bloom_tests.cpp')
-rw-r--r--src/test/bloom_tests.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 4a2851cf4..0d349a990 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -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);