aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server_commands_defs.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-05-10 17:20:20 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-05 11:19:34 +0000
commit2ec455df1f82148733c4ac268d22e9c51a690b14 (patch)
treedd0fe1637a7ba7a060b1a97966585bd9d6b87a8f /src/wallet/wallet_rpc_server_commands_defs.h
parentMerge pull request #5827 (diff)
downloadmonero-2ec455df1f82148733c4ac268d22e9c51a690b14.tar.xz
wallet: fix mismatch between two concepts of "balance"
One considers the blockchain, while the other considers the blockchain and some recent actions, such as a recently created transaction which spend some outputs, but isn't yet mined. Typically, the "balance" command wants the latter, to reflect the recent action, but things like proving ownership wants the former. This fixes a crash in get_reserve_proof, where a preliminary check and the main code used two concepts of "balance".
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r--src/wallet/wallet_rpc_server_commands_defs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h
index 4504ac752..c3668dac8 100644
--- a/src/wallet/wallet_rpc_server_commands_defs.h
+++ b/src/wallet/wallet_rpc_server_commands_defs.h
@@ -64,10 +64,12 @@ namespace wallet_rpc
uint32_t account_index;
std::set<uint32_t> address_indices;
bool all_accounts;
+ bool strict;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(account_index)
KV_SERIALIZE(address_indices)
KV_SERIALIZE_OPT(all_accounts, false);
+ KV_SERIALIZE_OPT(strict, false);
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<request_t> request;
@@ -230,9 +232,11 @@ namespace wallet_rpc
struct request_t
{
std::string tag; // all accounts if empty, otherwise those accounts with this tag
+ bool strict_balances;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(tag)
+ KV_SERIALIZE_OPT(strict_balances, false)
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<request_t> request;