File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ static RPCHelpMan waitfornewblock()
296
296
int timeout = 0 ;
297
297
if (!request.params [0 ].isNull ())
298
298
timeout = request.params [0 ].getInt <int >();
299
+ if (timeout < 0 ) throw JSONRPCError (RPC_MISC_ERROR, " Negative timeout" );
299
300
300
301
CUpdatedBlock block;
301
302
{
@@ -343,6 +344,7 @@ static RPCHelpMan waitforblock()
343
344
344
345
if (!request.params [1 ].isNull ())
345
346
timeout = request.params [1 ].getInt <int >();
347
+ if (timeout < 0 ) throw JSONRPCError (RPC_MISC_ERROR, " Negative timeout" );
346
348
347
349
CUpdatedBlock block;
348
350
{
@@ -391,6 +393,7 @@ static RPCHelpMan waitforblockheight()
391
393
392
394
if (!request.params [1 ].isNull ())
393
395
timeout = request.params [1 ].getInt <int >();
396
+ if (timeout < 0 ) throw JSONRPCError (RPC_MISC_ERROR, " Negative timeout" );
394
397
395
398
CUpdatedBlock block;
396
399
{
You can’t perform that action at this time.
0 commit comments