aboutsummaryrefslogtreecommitdiff
path: root/src/univalue
AgeCommit message (Collapse)Author
2022-07-29univalue: Remove unused and confusing set*() return valueMacroFake
2022-07-25Merge bitcoin/bitcoin#25611: univalue: Avoid brittle, narrowing and verbose ↵fanquake
integral type confusions fa23c197509f692a815193acc1b50bad2fcbedfe univalue: Avoid narrowing and verbose int constructors (MacroFake) fa3a9a1e8d9b6dffda772e97c279f3c0af6813f9 rpc: Select int-UniValue constructor for enum value in upgradewallet RPC (MacroFake) Pull request description: As UniValue provides several constructors for integral types, the compiler is unable to select one if the passed type does not exactly match. This is unintuitive for developers and forces them to write verbose and brittle code. (Refer to `-Wnarrowing` compiler warning) For example, there are many places where an unsigned int is cast to a signed int. While the cast is safe in practice, it is still needlessly verbose and confusing as the value can never be negative. In fact it might even be unsafe if the unsigned value is large enough to map to a negative signed one. Fix this issue and other (minor) type issues. ACKs for top commit: aureleoules: ACK fa23c197509f692a815193acc1b50bad2fcbedfe. Tree-SHA512: 7d99b5b90c7d8eed2e3448167255a59e817dd6b8fcfc1b17c69ddefd0db33d1bf4344fbcd8b7f8685b58182c0f572ab9ffa99467afa666ac21843df7ea645033
2022-07-18univalue: Return more detailed type check error messagesMacroFake
2022-07-18move-only: Move UniValue::getInt definition to keep class with definitions onlyMacroFake
Can be reviewed with the git options --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-07-18refactor: remove BOOST_*_TEST_ macrosfanquake
2022-07-18refactor: integrate no_nul into univalue unitesterfanquake
2022-07-18doc: remove references to downstreamfanquake
Having references to downstream no-longer make sense now that we've unsubtree'd.
2022-07-14univalue: Avoid narrowing and verbose int constructorsMacroFake
As UniValue provides several constructors for integral types, the compiler is unable to select one if the passed type does not exactly match. This is unintuitive for developers and forces them to write verbose and brittle code. For example, there are many places where an unsigned int is cast to a signed int. While the cast is safe in practice, it is still needlessly verbose and confusing as the value can never be negative. In fact it might even be unsafe if the unsigned value is large enough to map to a negative signed one.
2022-07-13univalue: Throw exception on invalid pushes over silent ignoreMacroFake
2022-06-24rpc: Fix Univalue push_backV OOM in listtransactionsMacroFake
2022-06-15refactor: cleanups post unsubtree'ing univaluefanquake
Mostly changes to remove src/univalue exceptions from the various linters, and the required code changes to make them happy. As well as minor doc changes.
2022-06-15refactor: un-subtree univaluefanquake
Remove all the files we don't use. This should not change behavior, or anything at all, as none of these files are currently used in our build system.
2022-05-30Bump univalue subtreeMacroFake
2022-05-12Bump univalue subtreeMacroFake
2021-10-11Update univalue subtree to latest upstreamfanquake
2020-11-19Update univalue subtreeMarcoFalke
2020-02-09Update univalue subtreeMarcoFalke
2019-10-30Update univalue subtreeMarcoFalke
2018-09-07Update univalue subtreeMarcoFalke
2018-02-10univalue: Bump subtreeMarcoFalke
2017-12-19univalue: Bump subtreeMarcoFalke
2017-09-29Bump univalue and fix json formatting in testsMarcoFalke
This merge commit bumps the univalue subtree and also updates the whitespace for some failing tests.
2017-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.
2016-09-30Merge commit '2ca7faab4205822b06dc2ab2bbda0a9a70fce7e0' into HEADMarcoFalke
2016-09-25Merge commit '3650668cdbbf369dd8f30c8e8eb5bb883325942d' into HEADMarcoFalke
2016-06-10Merge commit '60ab9b200654ef0914459711cf2b22be16be3dc2'Wladimir J. van der Laan
2015-12-02Merge commit '982709199f1b4e9e35211c419a81938f9f1dd4ed' into bitcoinMarcoFalke
2015-10-09Merge commit '313e7f5c89d6e72e06efe9255089765b4c5815fe' into HEADMarcoFalke
2015-10-01Merge commit '2f9f082b5ef3c495c70598ef23383effef675f9a' as 'src/univalue'Jonas Schnelli
2015-10-01remove univalue, prepare for subtreeJonas Schnelli
2015-08-20Stop parsing JSON after first finished construct.Daniel Kraft
Fix https://github.com/bitcoin/bitcoin/issues/6558. In particular, stop parsing JSON after the first object or array is finished. Check that no other garbage follows, and fail the parser if it does.
2015-07-18univalue: Avoid unnecessary roundtrip through double for numbersWladimir J. van der Laan
JSON makes no distinction between numbers and reals, and our code doesn't need to do so either. This removes VREAL, as well as its specific post-processing in `UniValue::write`. Non-monetary amounts do not need to be forcibly formatted with 8 decimals, so the extra roundtrip was unnecessary (and potentially loses precision).
2015-06-25UniValue: don't escape solidus, keep espacing of reverse solidusJonas Schnelli
2015-06-11Fix univalue handling of \u0000 characters.Daniel Kraft
Univalue's parsing of \u escape sequences did not handle NUL characters correctly. They were, effectively, dropped. The extended test-case fails with the old code, and is fixed with this patch.
2015-06-04use const references where appropriatePhilip Kaufmann
2015-06-04univalue: add strict type checkingWladimir J. van der Laan
2015-06-04Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli
- implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
2015-06-04univalue: correct bool supportJonas Schnelli
2015-06-04univalue: add support for real, fix percision and make it json_spirit compatibleJonas Schnelli
- avoid breaking the API because of different number/percision handling
2015-06-04Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik
2015-06-04UniValue: export NullUniValue global constantJeff Garzik
2015-06-04UniValue: prefer .size() to .count(), to harmonize w/ existing treeJeff Garzik
2014-12-16Remove references to X11 licenceMichael Ford
2014-11-03Fix all header definesPavel Janík
2014-09-05univalue: make spaceStr thread-safeWladimir J. van der Laan
Simply add spaces to the existing string instead of using a temporary. Fixes #4756.
2014-08-20UniValue: compact (!pretty) output should not include extra whitespaceJeff Garzik
2014-08-20UniValue: use correct setNumStr() input val, when setting number valuesJeff Garzik
2014-08-18Univalue: Do not build JSON escape list at runtimeJeff Garzik
No need to waste startup time building something that can be done at compile time. This also resolves a clang++ warning originally reported in #4714, univalue/univalue_write.cpp:33:12: warning: array subscript is of type 'char escapes['"'] = "\\""; ^~~~ etc.
2014-07-30univalue: remove unused methods getArray, getObjectJeff Garzik
2014-07-29Add "bitcoin-tx" command line utility and supporting modules.Jeff Garzik
This is a simple utility that provides command line manipulation of a hex-encoded TX. The utility takes a hex string on the command line as input, performs zero or more mutations, and outputs a hex string to standard output. This utility is also an intentional exercise of the "bitcoin library" concept. It is designed to require minimal libraries, and works entirely without need for any RPC or P2P communication. See "bitcoin-tx --help" for command and options summary.