diff options
author | Michał Sałaban <michal@salaban.info> | 2018-02-05 18:19:41 +0100 |
---|---|---|
committer | Michał Sałaban <michal@salaban.info> | 2018-02-05 23:39:37 +0100 |
commit | 6866ed469a1d35b494a2bdd5aedfebf8f689bd57 (patch) | |
tree | e14190526a36ce0373209691185a8b723c3d7ea6 /src/wallet/wallet_rpc_server.cpp | |
parent | Merge pull request #3198 (diff) | |
download | monero-6866ed469a1d35b494a2bdd5aedfebf8f689bd57.tar.xz |
Add default value to max_height, otherwise it's 0
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 97faf0b56..7d6b9b28c 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -39,6 +39,7 @@ using namespace epee; #include "wallet/wallet_args.h" #include "common/command_line.h" #include "common/i18n.h" +#include "cryptonote_config.h" #include "cryptonote_basic/cryptonote_format_utils.h" #include "cryptonote_basic/account.h" #include "multisig/multisig.h" @@ -1803,11 +1804,11 @@ namespace tools return false; } - uint64_t min_height = 0, max_height = (uint64_t)-1; + uint64_t min_height = 0, max_height = CRYPTONOTE_MAX_BLOCK_NUMBER; if (req.filter_by_height) { min_height = req.min_height; - max_height = req.max_height; + max_height = req.max_height <= max_height ? req.max_height : max_height; } if (req.in) |