mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge 14959753a4 into merged_master (Bitcoin PR #15744)
This commit is contained in:
commit
3fd900ce76
7 changed files with 48 additions and 23 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <warnings.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <tuple>
|
||||
#ifdef HAVE_MALLOC_INFO
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
|
@ -246,18 +247,7 @@ UniValue deriveaddresses(const JSONRPCRequest& request)
|
|||
int64_t range_end = 0;
|
||||
|
||||
if (request.params.size() >= 2 && !request.params[1].isNull()) {
|
||||
auto range = ParseRange(request.params[1]);
|
||||
if (range.first < 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should be greater or equal than 0");
|
||||
}
|
||||
if ((range.second >> 31) != 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range is too high");
|
||||
}
|
||||
if (range.second >= range.first + 1000000) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range is too large");
|
||||
}
|
||||
range_begin = range.first;
|
||||
range_end = range.second;
|
||||
std::tie(range_begin, range_end) = ParseDescriptorRange(request.params[1]);
|
||||
}
|
||||
|
||||
FlatSigningProvider key_provider;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue