Changeset View
Changeset View
Standalone View
Standalone View
src/test/sigcache_tests.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | CDataStream stream( | ||||
SER_NETWORK, PROTOCOL_VERSION); | SER_NETWORK, PROTOCOL_VERSION); | ||||
CTransaction dummyTx(deserialize, stream); | CTransaction dummyTx(deserialize, stream); | ||||
PrecomputedTransactionData txdata(dummyTx); | PrecomputedTransactionData txdata(dummyTx); | ||||
CachingTransactionSignatureChecker checker(&dummyTx, 0, 0 * SATOSHI, true, | CachingTransactionSignatureChecker checker(&dummyTx, 0, 0 * SATOSHI, true, | ||||
txdata); | txdata); | ||||
TestCachingTransactionSignatureChecker testChecker(checker); | TestCachingTransactionSignatureChecker testChecker(checker); | ||||
CBitcoinSecret bsecret1, bsecret1C; | CKey key1 = DecodeSecret(strSecret1); | ||||
BOOST_CHECK(bsecret1.SetString(strSecret1)); | |||||
BOOST_CHECK(bsecret1C.SetString(strSecret1C)); | |||||
CKey key1 = bsecret1.GetKey(); | |||||
BOOST_CHECK(key1.IsCompressed() == false); | BOOST_CHECK(key1.IsCompressed() == false); | ||||
CKey key1C = bsecret1C.GetKey(); | CKey key1C = DecodeSecret(strSecret1C); | ||||
BOOST_CHECK(key1C.IsCompressed() == true); | BOOST_CHECK(key1C.IsCompressed() == true); | ||||
CPubKey pubkey1 = key1.GetPubKey(); | CPubKey pubkey1 = key1.GetPubKey(); | ||||
CPubKey pubkey1C = key1C.GetPubKey(); | CPubKey pubkey1C = key1C.GetPubKey(); | ||||
for (int n = 0; n < 16; n++) { | for (int n = 0; n < 16; n++) { | ||||
std::string strMsg = strprintf("Sigcache test1 %i: xx", n); | std::string strMsg = strprintf("Sigcache test1 %i: xx", n); | ||||
uint256 hashMsg = Hash(strMsg.begin(), strMsg.end()); | uint256 hashMsg = Hash(strMsg.begin(), strMsg.end()); | ||||
Show All 38 Lines |