aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-02-20 00:57:26 +0200
committerRiccardo Spagni <ric@spagni.net>2015-02-20 00:57:26 +0200
commit7b01a076b90cecbeea0f071b41f5e9fa818635b2 (patch)
tree408abe3a8a63d848bf262c7179c1e2c1b7b57f8a /src
parentmake fallback compatible with newer slow-hash (diff)
downloadmonero-7b01a076b90cecbeea0f071b41f5e9fa818635b2.tar.xz
added tx size to incoming_transfers RPC Call
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index f856e5b8a..e7940d57b 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -431,11 +431,13 @@ namespace tools
{
transfers_found = true;
}
+ auto txBlob = t_serializable_object_to_blob(td.m_tx);
wallet_rpc::transfer_details rpc_transfers;
rpc_transfers.amount = td.amount();
rpc_transfers.spent = td.m_spent;
rpc_transfers.global_index = td.m_global_output_index;
rpc_transfers.tx_hash = boost::lexical_cast<std::string>(cryptonote::get_transaction_hash(td.m_tx));
+ rpc_transfers.tx_size = txBlob.size();
res.transfers.push_back(rpc_transfers);
}
}
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index 44bb54c97..35783a189 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -228,12 +228,14 @@ namespace wallet_rpc
bool spent;
uint64_t global_index;
std::string tx_hash;
+ uint64_t tx_size;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(amount)
KV_SERIALIZE(spent)
KV_SERIALIZE(global_index)
KV_SERIALIZE(tx_hash)
+ KV_SERIALIZE(tx_size)
END_KV_SERIALIZE_MAP()
};