aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index d61b11f8a..33e099ceb 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -46,6 +46,9 @@ using namespace epee;
#include "string_tools.h"
#include "crypto/hash.h"
+#undef MONERO_DEFAULT_LOG_CATEGORY
+#define MONERO_DEFAULT_LOG_CATEGORY "wallet.rpc"
+
namespace
{
const command_line::arg_descriptor<std::string, true> arg_rpc_bind_port = {"rpc-bind-port", "Sets bind port for server"};
@@ -393,6 +396,7 @@ namespace tools
std::vector<cryptonote::tx_destination_entry> dsts;
std::vector<uint8_t> extra;
+ LOG_PRINT_L3("on_transfer_split starts");
if (m_wallet.restricted())
{
er.code = WALLET_RPC_ERROR_CODE_DENIED;
@@ -482,9 +486,13 @@ namespace tools
mixin = 2;
}
std::vector<wallet2::pending_tx> ptx_vector;
+ LOG_PRINT_L2("on_transfer_split calling create_transactions_2");
ptx_vector = m_wallet.create_transactions_2(dsts, mixin, req.unlock_time, req.priority, extra, req.trusted_daemon);
+ LOG_PRINT_L2("on_transfer_split called create_transactions_2");
+ LOG_PRINT_L2("on_transfer_split calling commit_txyy");
m_wallet.commit_tx(ptx_vector);
+ LOG_PRINT_L2("on_transfer_split called commit_txyy");
// populate response with tx hashes
for (auto & ptx : ptx_vector)
@@ -1323,7 +1331,8 @@ int main(int argc, char** argv) {
return 1;
}
- epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL, LOG_LEVEL_2);
+ mlog_configure("monero-wallet-rpc.log", true);
+ mlog_set_log_level(2);
std::unique_ptr<tools::wallet2> wal;
try
@@ -1368,12 +1377,12 @@ int main(int argc, char** argv) {
// if we ^C during potentially length load/refresh, there's no server loop yet
if (quit)
{
- LOG_PRINT_L0(tools::wallet_rpc_server::tr("Storing wallet..."));
+ MINFO(tools::wallet_rpc_server::tr("Storing wallet..."));
wal->store();
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Stored ok"), LOG_LEVEL_0);
+ MINFO(tools::wallet_rpc_server::tr("Stored ok"));
return 1;
}
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Loaded ok"), LOG_LEVEL_0);
+ MINFO(tools::wallet_rpc_server::tr("Loaded ok"));
}
catch (const std::exception& e)
{
@@ -1393,7 +1402,7 @@ int main(int argc, char** argv) {
{
LOG_PRINT_L0(tools::wallet_rpc_server::tr("Storing wallet..."));
wal->store();
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Stored ok"), LOG_LEVEL_0);
+ LOG_PRINT_L0(tools::wallet_rpc_server::tr("Stored ok"));
}
catch (const std::exception& e)
{