summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-05-08 19:41:43 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-05-08 19:41:43 (GMT)
commit24eb32df703f41bf6c6c8b238f11347161606b37 (patch)
tree070dd3a338a51c9a791d250e8f5684765bf180a4
parent54e58f434babc6a153bb3aafb7706bd3aa4a91d4 (diff)
stealth_address is now a simple struct
-rw-r--r--src/mktx.cpp12
-rw-r--r--src/stealth-show-addr.cpp12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mktx.cpp b/src/mktx.cpp
index 0072cb3..0852256 100644
--- a/src/mktx.cpp
+++ b/src/mktx.cpp
@@ -162,18 +162,18 @@ bool add_output(transaction_type& tx, const std::string& parameter)
}
else if (stealth.set_encoded(output_str))
{
- bool reuse_key = stealth.options() & stealth_address::reuse_key_option;
+ bool reuse_key = stealth.options & stealth_address::reuse_key_option;
// Get our scan and spend pubkeys.
- const ec_point& scan_pubkey = stealth.scan_pubkey();
+ const ec_point& scan_pubkey = stealth.scan_pubkey;
BITCOIN_ASSERT_MSG(
- (!reuse_key && stealth.spend_pubkeys().size() == 1) ||
- (reuse_key && stealth.spend_pubkeys().empty()),
+ (!reuse_key && stealth.spend_pubkeys.size() == 1) ||
+ (reuse_key && stealth.spend_pubkeys.empty()),
"Multisig stealth addresses not yet supported!");
- BITCOIN_ASSERT_MSG(stealth.prefix().number_bits == 0,
+ BITCOIN_ASSERT_MSG(stealth.prefix.number_bits == 0,
"Prefix not supported yet!");
ec_point spend_pubkey = scan_pubkey;
if (!reuse_key)
- spend_pubkey = stealth.spend_pubkeys().front();
+ spend_pubkey = stealth.spend_pubkeys.front();
// Do stealth stuff.
ec_secret ephem_secret = generate_random_ephemkey();
ec_point addr_pubkey = initiate_stealth(
diff --git a/src/stealth-show-addr.cpp b/src/stealth-show-addr.cpp
index 74d8516..7f1cee0 100644
--- a/src/stealth-show-addr.cpp
+++ b/src/stealth-show-addr.cpp
@@ -29,21 +29,21 @@ int main(int argc, char** argv)
}
// Now display fields.
std::cout << "Options: ";
- if (addr.options() & stealth_address::reuse_key_option)
+ if (addr.options & stealth_address::reuse_key_option)
std::cout << "reuse_key";
else
std::cout << "none";
std::cout << std::endl;
- std::cout << "Scan pubkey: " << addr.scan_pubkey() << std::endl;
+ std::cout << "Scan pubkey: " << addr.scan_pubkey << std::endl;
std::cout << "Spend pubkeys:" << std::endl;
- for (const auto& pubkey: addr.spend_pubkeys())
+ for (const auto& pubkey: addr.spend_pubkeys)
std::cout << " " << pubkey << std::endl;
std::cout << "Number required signatures: "
- << addr.number_signatures() << std::endl;
+ << addr.number_signatures << std::endl;
// Display prefix.
std::cout << "Prefix: "
- << (size_t)addr.prefix().number_bits << " "
- << addr.prefix().bitfield << std::endl;
+ << (size_t)addr.prefix.number_bits << " "
+ << addr.prefix.bitfield << std::endl;
return 0;
}