0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/univalue/test
Ryan Ofsky 293849a260 univalue: Remove confusing getBool method
Drop UniValue::getBool method because it is easy to confuse with the
UniValue::get_bool method, and could potentially cause bugs. Unlike get_bool,
getBool doesn't ensure that the value is a boolean and returns false for all
integer, string, array, and object values instead of throwing an exceptions.

The getBool method is also redundant because it is an alias for isTrue. There
were only 5 getBool() calls in the codebase, so this commit replaces them with
isTrue() or get_bool() calls as appropriate.

These changes were originally made by MarcoFalke in
https://github.com/bitcoin/bitcoin/pull/26213 but were dropped to limit the
scope of that PR.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
2022-12-09 10:03:26 -05:00
..
.gitignore refactor: integrate no_nul into univalue unitester 2022-07-18 09:15:18 +01:00
fail1.json
fail2.json
fail3.json
fail4.json
fail5.json
fail6.json
fail7.json
fail8.json
fail9.json
fail10.json
fail11.json
fail12.json
fail13.json
fail14.json
fail15.json
fail16.json
fail17.json
fail18.json
fail19.json
fail20.json
fail21.json
fail22.json
fail23.json
fail24.json
fail25.json
fail26.json
fail27.json
fail28.json
fail29.json
fail30.json
fail31.json
fail32.json
fail33.json
fail34.json
fail35.json
fail36.json
fail37.json
fail38.json
fail39.json
fail40.json
fail41.json
fail42.json
fail44.json
fail45.json
object.cpp univalue: Remove confusing getBool method 2022-12-09 10:03:26 -05:00
pass1.json
pass2.json
pass3.json
pass4.json
round1.json
round2.json
round3.json
round4.json
round5.json
round6.json
round7.json
test_json.cpp Bump univalue subtree 2022-05-12 11:52:28 +02:00
unitester.cpp refactor: integrate no_nul into univalue unitester 2022-07-18 09:15:18 +01:00