aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-02-20 17:46:00 +0200
committerRiccardo Spagni <ric@spagni.net>2018-02-20 17:46:00 +0200
commit0fc5eec9cd8baea019a693f682102d85243142a4 (patch)
tree9f07b0e308aac5f6e241324ba3b5de79e273bb9f /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #3275 (diff)
parentAdd default value to max_height, otherwise it's 0 (diff)
downloadmonero-0fc5eec9cd8baea019a693f682102d85243142a4.tar.xz
Merge pull request #3235
6866ed46 Add default value to max_height, otherwise it's 0 (Michał Sałaban)
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 5c644983b..6d5419521 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)