本文整理汇总了C++中cryptonote::Currency::parseAccountAddressString方法的典型用法代码示例。如果您正苦于以下问题:C++ Currency::parseAccountAddressString方法的具体用法?C++ Currency::parseAccountAddressString怎么用?C++ Currency::parseAccountAddressString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cryptonote::Currency
的用法示例。
在下文中一共展示了Currency::parseAccountAddressString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TEST(parseAccountAddressString, fails_on_invalid_address_prefix)
{
std::string addr_str = base58::encode_addr(0, test_serialized_keys);
Logging::LoggerGroup logger;
CryptoNote::Currency currency = CryptoNote::CurrencyBuilder(logger).currency();
CryptoNote::AccountPublicAddress addr;
ASSERT_FALSE(currency.parseAccountAddressString(addr_str, addr));
}
示例2: test_block_creation
bool test_block_creation()
{
Logging::ConsoleLogger logger;
uint64_t vszs[] = {80,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,472,476,476,475,475,474,475,474,474,475,9391,476,476,475,475,474,475,8819,8301,475,472,4302,5316,14347,16620,19583,19403,19728,19442,19852,19015,19000,19016,19795,19749,18087,19787,19704,19750,19267,19006,19050,19445,19407,19522,19546,19788,19369,19486,19329,19370,18853,19600,19110,19320,19746,19474,19474,19743,19494,19755,19715,19769,19620,19368,19839,19532,23424,28287,30707};
std::vector<uint64_t> szs(&vszs[0], &vszs[90]);
CryptoNote::Currency currency = CryptoNote::CurrencyBuilder(logger).currency();
AccountPublicAddress adr;
bool r = currency.parseAccountAddressString("272xWzbWsP4cfNFfxY5ETN5moU8x81PKfWPwynrrqsNGDBQGLmD1kCkKCvPeDUXu5XfmZkCrQ53wsWmdfvHBGLNjGcRiDcK", adr);
CHECK_AND_ASSERT_MES(r, false, "failed to import");
BlockTemplate b;
r = currency.constructMinerTx(BLOCK_MAJOR_VERSION_1, 90, Common::medianValue(szs), 3553616528562147, 33094, 10000000, adr, b.baseTransaction, BinaryArray(), 11);
return r;
}
示例3: validateAddress
bool validateAddress(const std::string& address, const CryptoNote::Currency& currency) {
CryptoNote::AccountPublicAddress ignore;
return currency.parseAccountAddressString(address, ignore);
}
示例4: GetOneBlockReward
void WalletApi::GetOneBlockReward(CryptoNote::Wallet& wallet) {
cryptonote::AccountPublicAddress address;
ASSERT_TRUE(m_currency.parseAccountAddressString(wallet.getAddress(), address));
generator.getBlockRewardForAddress(address);
}