mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-02 16:59:44 +01:00
rpc: add missing space in JSON parsing error message, update test
This commit is contained in:
@@ -217,7 +217,7 @@ UniValue ParseNonRFCJSONValue(const std::string& strVal)
|
|||||||
UniValue jVal;
|
UniValue jVal;
|
||||||
if (!jVal.read(std::string("[")+strVal+std::string("]")) ||
|
if (!jVal.read(std::string("[")+strVal+std::string("]")) ||
|
||||||
!jVal.isArray() || jVal.size()!=1)
|
!jVal.isArray() || jVal.size()!=1)
|
||||||
throw std::runtime_error(std::string("Error parsing JSON:")+strVal);
|
throw std::runtime_error(std::string("Error parsing JSON: ") + strVal);
|
||||||
return jVal[0];
|
return jVal[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ from test_framework.util import (
|
|||||||
BLOCKS = 101
|
BLOCKS = 101
|
||||||
BALANCE = (BLOCKS - 100) * 50
|
BALANCE = (BLOCKS - 100) * 50
|
||||||
|
|
||||||
JSON_PARSING_ERROR = 'error: Error parsing JSON:foo'
|
JSON_PARSING_ERROR = 'error: Error parsing JSON: foo'
|
||||||
BLOCKS_VALUE_OF_ZERO = 'error: the first argument (number of blocks to generate, default: 1) must be an integer value greater than zero'
|
BLOCKS_VALUE_OF_ZERO = 'error: the first argument (number of blocks to generate, default: 1) must be an integer value greater than zero'
|
||||||
TOO_MANY_ARGS = 'error: too many arguments (maximum 2 for nblocks and maxtries)'
|
TOO_MANY_ARGS = 'error: too many arguments (maximum 2 for nblocks and maxtries)'
|
||||||
WALLET_NOT_LOADED = 'Requested wallet does not exist or is not loaded'
|
WALLET_NOT_LOADED = 'Requested wallet does not exist or is not loaded'
|
||||||
|
|||||||
Reference in New Issue
Block a user