wallet_rpc_server: add block_height and frozen to incoming_transfers

This commit is contained in:
moneromooo-monero 2019-04-20 08:41:56 +00:00
parent ef1f1c5314
commit 31a9aa83af
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
2 changed files with 7 additions and 1 deletions

View File

@ -1848,6 +1848,8 @@ namespace tools
rpc_transfers.tx_hash = epee::string_tools::pod_to_hex(td.m_txid); rpc_transfers.tx_hash = epee::string_tools::pod_to_hex(td.m_txid);
rpc_transfers.subaddr_index = {td.m_subaddr_index.major, td.m_subaddr_index.minor}; rpc_transfers.subaddr_index = {td.m_subaddr_index.major, td.m_subaddr_index.minor};
rpc_transfers.key_image = td.m_key_image_known ? epee::string_tools::pod_to_hex(td.m_key_image) : ""; rpc_transfers.key_image = td.m_key_image_known ? epee::string_tools::pod_to_hex(td.m_key_image) : "";
rpc_transfers.block_height = td.m_block_height;
rpc_transfers.frozen = td.m_frozen;
rpc_transfers.unlocked = m_wallet->is_transfer_unlocked(td); rpc_transfers.unlocked = m_wallet->is_transfer_unlocked(td);
res.transfers.push_back(rpc_transfers); res.transfers.push_back(rpc_transfers);
} }

View File

@ -47,7 +47,7 @@
// advance which version they will stop working with // advance which version they will stop working with
// Don't go over 32767 for any of these // Don't go over 32767 for any of these
#define WALLET_RPC_VERSION_MAJOR 1 #define WALLET_RPC_VERSION_MAJOR 1
#define WALLET_RPC_VERSION_MINOR 12 #define WALLET_RPC_VERSION_MINOR 13
#define MAKE_WALLET_RPC_VERSION(major,minor) (((major)<<16)|(minor)) #define MAKE_WALLET_RPC_VERSION(major,minor) (((major)<<16)|(minor))
#define WALLET_RPC_VERSION MAKE_WALLET_RPC_VERSION(WALLET_RPC_VERSION_MAJOR, WALLET_RPC_VERSION_MINOR) #define WALLET_RPC_VERSION MAKE_WALLET_RPC_VERSION(WALLET_RPC_VERSION_MAJOR, WALLET_RPC_VERSION_MINOR)
namespace tools namespace tools
@ -982,6 +982,8 @@ namespace wallet_rpc
std::string tx_hash; std::string tx_hash;
cryptonote::subaddress_index subaddr_index; cryptonote::subaddress_index subaddr_index;
std::string key_image; std::string key_image;
uint64_t block_height;
bool frozen;
bool unlocked; bool unlocked;
BEGIN_KV_SERIALIZE_MAP() BEGIN_KV_SERIALIZE_MAP()
@ -991,6 +993,8 @@ namespace wallet_rpc
KV_SERIALIZE(tx_hash) KV_SERIALIZE(tx_hash)
KV_SERIALIZE(subaddr_index) KV_SERIALIZE(subaddr_index)
KV_SERIALIZE(key_image) KV_SERIALIZE(key_image)
KV_SERIALIZE(block_height)
KV_SERIALIZE(frozen)
KV_SERIALIZE(unlocked) KV_SERIALIZE(unlocked)
END_KV_SERIALIZE_MAP() END_KV_SERIALIZE_MAP()
}; };