mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 16:42:28 -04:00
wallet: create set_subaddress_lookahead wallet rpc endpoint
This commit is contained in:
parent
b987676d63
commit
6f36037116
5 changed files with 63 additions and 1 deletions
|
@ -704,6 +704,18 @@ namespace tools
|
|||
res.index = *index;
|
||||
return true;
|
||||
}
|
||||
bool wallet_rpc_server::on_set_subaddr_lookahead(const wallet_rpc::COMMAND_RPC_SET_SUBADDR_LOOKAHEAD::request& req, wallet_rpc::COMMAND_RPC_SET_SUBADDR_LOOKAHEAD::response& res, epee::json_rpc::error& er, const connection_context *ctx)
|
||||
{
|
||||
if (!m_wallet) return not_open(er);
|
||||
try {
|
||||
m_wallet->set_subaddress_lookahead(req.major_idx, req.minor_idx);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
handle_rpc_exception(std::current_exception(), er, WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
bool wallet_rpc_server::on_create_address(const wallet_rpc::COMMAND_RPC_CREATE_ADDRESS::request& req, wallet_rpc::COMMAND_RPC_CREATE_ADDRESS::response& res, epee::json_rpc::error& er, const connection_context *ctx)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue