diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-02 13:06:41 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-06-27 21:38:21 +0100 |
commit | dcbc17e97e782d168d1653e216d415bb4d34a892 (patch) | |
tree | a4702dae618ce6965765af1008aad4673af867e4 /src/wallet/wallet_rpc_server_commands_defs.h | |
parent | Merge pull request #3716 (diff) | |
download | monero-dcbc17e97e782d168d1653e216d415bb4d34a892.tar.xz |
wallet: include a suggested number of confirmations based on amount
This is based on how much an attacking miner stands to lose in block
rewardy by mining a private chain which double spends a payment.
This is not foolproof, since mining is based on luck, and breaks
down as the attacking miner nears 50% of the network hash rate,
and the estimation is based on a constant block reward.
Diffstat (limited to 'src/wallet/wallet_rpc_server_commands_defs.h')
-rw-r--r-- | src/wallet/wallet_rpc_server_commands_defs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server_commands_defs.h b/src/wallet/wallet_rpc_server_commands_defs.h index 96e135f01..aa61640a3 100644 --- a/src/wallet/wallet_rpc_server_commands_defs.h +++ b/src/wallet/wallet_rpc_server_commands_defs.h @@ -47,7 +47,7 @@ // advance which version they will stop working with // Don't go over 32767 for any of these #define WALLET_RPC_VERSION_MAJOR 1 -#define WALLET_RPC_VERSION_MINOR 0 +#define WALLET_RPC_VERSION_MINOR 1 #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) namespace tools @@ -1194,6 +1194,8 @@ namespace wallet_rpc cryptonote::subaddress_index subaddr_index; std::string address; bool double_spend_seen; + uint64_t confirmations; + uint64_t suggested_confirmation_threshold; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(txid); @@ -1209,6 +1211,8 @@ namespace wallet_rpc KV_SERIALIZE(subaddr_index); KV_SERIALIZE(address); KV_SERIALIZE(double_spend_seen) + KV_SERIALIZE_OPT(confirmations, 0) + KV_SERIALIZE_OPT(suggested_confirmation_threshold, 0) END_KV_SERIALIZE_MAP() }; |