1
0
Fork 0
forked from lthn/blockchain

wallet rpc: tx_comment is now put into tx's extra for consistency with wallet_manager's approach

This commit is contained in:
sowle 2025-06-19 17:42:00 +02:00
parent 430cbffd25
commit 1b0f64176d
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -73,11 +73,11 @@ void exception_handler()
namespace tools
{
//-----------------------------------------------------------------------------------
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_rpc_bind_port ("rpc-bind-port", "Starts wallet as rpc server for wallet operations, sets bind port for server");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_rpc_bind_ip ("rpc-bind-ip", "Specify ip to bind rpc server", "127.0.0.1");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_miner_text_info ( "miner-text-info", "Wallet password");
const command_line::arg_descriptor<bool> wallet_rpc_server::arg_deaf_mode ( "deaf", "Put wallet into 'deaf' mode make it ignore any rpc commands(usable for safe PoS mining)");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_jwt_secret("jwt-secret", "Enables JWT auth over secret string provided");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_rpc_bind_port ("rpc-bind-port", "Starts wallet as rpc server for wallet operations, sets bind port for server");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_rpc_bind_ip ("rpc-bind-ip", "Specify ip to bind rpc server", "127.0.0.1");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_miner_text_info ("miner-text-info", "Wallet password");
const command_line::arg_descriptor<bool> wallet_rpc_server::arg_deaf_mode ("deaf", "Put wallet into 'deaf' mode make it ignore any rpc commands(usable for safe PoS mining)");
const command_line::arg_descriptor<std::string> wallet_rpc_server::arg_jwt_secret ("jwt-secret", "Enables JWT auth over secret string provided");
void wallet_rpc_server::init_options(boost::program_options::options_description& desc)
{
@ -428,7 +428,7 @@ namespace tools
return true;
WALLET_RPC_CATCH_TRY_ENTRY();
}
//------------------------------------------------------------------------------------------------------------------------------
bool wallet_rpc_server::on_transfer(const wallet_public::COMMAND_RPC_TRANSFER::request& req, wallet_public::COMMAND_RPC_TRANSFER::response& res, epee::json_rpc::error& er, connection_context& cntx)
{
WALLET_RPC_BEGIN_TRY_ENTRY();
@ -525,7 +525,7 @@ namespace tools
{
currency::tx_comment comment = AUTO_VAL_INIT(comment);
comment.comment = req.comment;
attachments.push_back(comment);
extra.push_back(comment);
}
if (req.push_payer && !wrap)