aboutsummaryrefslogtreecommitdiff
path: root/src/test/bech32_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-15 11:30:41 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-15 12:10:34 +0200
commit1d4662f5dcf64bd8cbab7386616461b570e93e67 (patch)
tree1d906ede0fa5aa3f80c787a309b1f904a5f2ce5d /src/test/bech32_tests.cpp
parent3b84ebb5bc0d55d488ce2626ac3232729535eca8 (diff)
parent60f61f99529f54f85c847d61122c70c0358ebecc (diff)
downloadbitcoin-1d4662f5dcf64bd8cbab7386616461b570e93e67.tar.xz
Merge #12881: Minor optimizations to bech32::Decode(); add tests.
60f61f9 Tighten up bech32::Decode(); add tests. (murrayn) Pull request description: Just a few minor optimizations to bech32::Decode(): 1) optimize the order and logic of the conditionals 2) get rid of subsequent '(c < 33 || c > 126)' check which is redundant (already performed above) 3) add a couple more bech32 tests (mixed-case) Tree-SHA512: e41af834c8f6b7d34c22c28b724df42c60f72e00df616e70a12efbc4271d15d80627fe1bc36845caf29f615c238499a566298a863cbe119fef457287231053c8
Diffstat (limited to 'src/test/bech32_tests.cpp')
-rw-r--r--src/test/bech32_tests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/bech32_tests.cpp b/src/test/bech32_tests.cpp
index c23e23f6a1..6ecc9ac705 100644
--- a/src/test/bech32_tests.cpp
+++ b/src/test/bech32_tests.cpp
@@ -57,6 +57,8 @@ BOOST_AUTO_TEST_CASE(bip173_testvectors_invalid)
"A1G7SGD8",
"10a06t8",
"1qzzfhee",
+ "a12UEL5L",
+ "A12uEL5L",
};
for (const std::string& str : CASES) {
auto ret = bech32::Decode(str);