Created
June 14, 2022 15:55
-
-
Save stoffu/9a4a7260403e3c1111c913f4903eeabd to your computer and use it in GitHub Desktop.
unsigned_transaction.cpp: empty all functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- unsigned_transaction.cpp 2022-05-23 00:11:29.000000000 +0900 | |
+++ unsigned_transaction.new.cpp 2022-06-15 00:53:59.000000000 +0900 | |
@@ -70,6 +70,7 @@ | |
bool UnsignedTransactionImpl::sign(const std::string &signedFileName) | |
{ | |
+#if 0 | |
if(m_wallet.watchOnly()) | |
{ | |
m_errorString = tr("This is a watch only wallet"); | |
@@ -93,12 +94,14 @@ | |
m_status = Status_Error; | |
return false; | |
} | |
+#endif | |
return true; | |
} | |
//---------------------------------------------------------------------------------------------------- | |
bool UnsignedTransactionImpl::checkLoadedTx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message) | |
{ | |
+#if 0 | |
// gather info to ask the user | |
uint64_t amount = 0, amount_to_dests = 0, change = 0; | |
size_t min_ring_size = ~0; | |
@@ -212,35 +215,41 @@ | |
change_string += tr("no change"); | |
uint64_t fee = amount - amount_to_dests; | |
m_confirmationMessage = (boost::format(tr("Loaded %lu transactions, for %s, fee %s, %s, %s, with min ring size %lu. %s")) % (unsigned long)get_num_txes() % cryptonote::print_money(amount) % cryptonote::print_money(fee) % dest_string % change_string % (unsigned long)min_ring_size % extra_message).str(); | |
+#endif | |
return true; | |
} | |
std::vector<uint64_t> UnsignedTransactionImpl::amount() const | |
{ | |
std::vector<uint64_t> result; | |
+#if 0 | |
for (const auto &utx : m_unsigned_tx_set.txes) { | |
for (const auto &unsigned_dest : utx.dests) { | |
result.push_back(unsigned_dest.amount); | |
} | |
} | |
+#endif | |
return result; | |
} | |
std::vector<uint64_t> UnsignedTransactionImpl::fee() const | |
{ | |
std::vector<uint64_t> result; | |
+#if 0 | |
for (const auto &utx : m_unsigned_tx_set.txes) { | |
uint64_t fee = 0; | |
for (const auto &i: utx.sources) fee += i.amount; | |
for (const auto &i: utx.splitted_dsts) fee -= i.amount; | |
result.push_back(fee); | |
} | |
+#endif | |
return result; | |
} | |
std::vector<uint64_t> UnsignedTransactionImpl::mixin() const | |
{ | |
std::vector<uint64_t> result; | |
+#if 0 | |
for (const auto &utx: m_unsigned_tx_set.txes) { | |
size_t min_mixin = ~0; | |
// TODO: Is this loop needed or is sources[0] ? | |
@@ -251,6 +260,7 @@ | |
} | |
result.push_back(min_mixin); | |
} | |
+#endif | |
return result; | |
} | |
@@ -262,6 +272,7 @@ | |
std::vector<std::string> UnsignedTransactionImpl::paymentId() const | |
{ | |
std::vector<string> result; | |
+#if 0 | |
for (const auto &utx: m_unsigned_tx_set.txes) { | |
crypto::hash payment_id = crypto::null_hash; | |
cryptonote::tx_extra_nonce extra_nonce; | |
@@ -285,6 +296,7 @@ | |
else | |
result.push_back(""); | |
} | |
+#endif | |
return result; | |
} | |
@@ -292,6 +304,7 @@ | |
{ | |
// TODO: return integrated address if short payment ID exists | |
std::vector<string> result; | |
+#if 0 | |
for (const auto &utx: m_unsigned_tx_set.txes) { | |
if (utx.dests.empty()) { | |
MERROR("empty destinations, skipped"); | |
@@ -299,12 +312,14 @@ | |
} | |
result.push_back(cryptonote::get_account_address_as_str(m_wallet.m_wallet->nettype(), utx.dests[0].is_subaddress, utx.dests[0].addr)); | |
} | |
+#endif | |
return result; | |
} | |
uint64_t UnsignedTransactionImpl::minMixinCount() const | |
{ | |
uint64_t min_mixin = ~0; | |
+#if 0 | |
for (const auto &utx: m_unsigned_tx_set.txes) { | |
for (size_t s = 0; s < utx.sources.size(); ++s) { | |
size_t mixin = utx.sources[s].outputs.size() - 1; | |
@@ -312,6 +327,7 @@ | |
min_mixin = mixin; | |
} | |
} | |
+#endif | |
return min_mixin; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment