mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 45f434f44d into merged_master (Bitcoin PR #15288)
This commit is contained in:
commit
edfdf46351
21 changed files with 302 additions and 160 deletions
|
|
@ -4,14 +4,12 @@
|
|||
|
||||
#include <key_io.h>
|
||||
#include <keystore.h>
|
||||
#include <policy/fees.h>
|
||||
#include <rpc/util.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <policy/policy.h>
|
||||
#include <assetsdir.h>
|
||||
#include <core_io.h>
|
||||
#include <validation.h>
|
||||
|
||||
InitInterfaces* g_rpc_interfaces = nullptr;
|
||||
|
||||
|
|
@ -141,10 +139,9 @@ UniValue DescribeAddress(const CTxDestination& dest)
|
|||
return boost::apply_visitor(DescribeAddressVisitor(), dest);
|
||||
}
|
||||
|
||||
unsigned int ParseConfirmTarget(const UniValue& value)
|
||||
unsigned int ParseConfirmTarget(const UniValue& value, unsigned int max_target)
|
||||
{
|
||||
int target = value.get_int();
|
||||
unsigned int max_target = ::feeEstimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE);
|
||||
if (target < 1 || (unsigned int)target > max_target) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u - %u", 1, max_target));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue