change max block decrement amount to 50
This commit is contained in:
parent
6542b53b36
commit
61664b027b
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
|||
#include "univalue.h"
|
||||
#include "txmempool.h"
|
||||
|
||||
// Maximum block decrement that is allowed from rpc calls
|
||||
const int MAX_RPC_BLOCK_DECREMENTS = 50;
|
||||
|
||||
UniValue getclaimsintrie(const UniValue& params, bool fHelp)
|
||||
{
|
||||
|
@ -682,7 +684,7 @@ UniValue getnameproof(const UniValue& params, bool fHelp)
|
|||
if (!chainActive.Contains(pblockIndex))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block not in main chain");
|
||||
|
||||
if (chainActive.Tip()->nHeight > (pblockIndex->nHeight + 20))
|
||||
if (chainActive.Tip()->nHeight > (pblockIndex->nHeight + MAX_RPC_BLOCK_DECREMENTS))
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Block too deep to generate proof");
|
||||
|
||||
CClaimTrieProof proof;
|
||||
|
|
Loading…
Reference in a new issue