cln/common/test
Rusty Russell 58327a594f codex32: rework.
Firstly, I wanted the results easier to use:
1. Make them always lower case, even if the string was UPPER.
2. Decode the payload for them.
3. Don't give the user any fields they don't need, and make
   the field sizes explicit.

Secondly, I wanted to avoid the pattern of "check in one place, assume
in another", in favour of "check on use".

So, I changed the code to lower the string if it needs to at the start,
and then changed the pull functions so we always use them to get data:
this way we should fail clearly and gracefully if we don't have enough data.

I made all the checks explicit, where we assign the fields.

I also addressed the FIXME: I think the array is *often* one shorter,
but not always, so I trim the last byte at the end if needed.

[ Aditya modified the tests to work ]

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-31 11:29:59 +09:30
..
Makefile common: add test to generate BOLT formatting vectors. 2023-06-15 15:05:42 +09:30
onion-test-v0.json sphinx: Introduce a runtest command to the onion tool 2019-07-30 02:14:49 +00:00
run-amount.c bitcoin: remove unused functions, or make static. 2021-12-06 10:05:39 +10:30
run-base64.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-bigsize.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-blindedpath_enctlv.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-blindedpath_onion.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-bolt11.c Makefile: bolt version b38156b9510c0562cf50f8758a64602cc0315c19 2023-04-07 21:22:56 +09:30
run-bolt12-format-string-test.c common: add test to generate BOLT formatting vectors. 2023-06-15 15:05:42 +09:30
run-bolt12_decode.c common: add test to generate BOLT formatting vectors. 2023-06-15 15:05:42 +09:30
run-bolt12_merkle-json.c signed types: add handlers for signed types 2023-07-13 19:34:47 +09:30
run-bolt12_merkle.c common/test: fix typo in bolt12 test vector generation. 2023-01-06 20:44:50 +01:00
run-bolt12_period.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-channel_type.c common: fix build of run-channel_type.c 2023-04-06 14:43:48 +02:00
run-codex32.c codex32: rework. 2023-07-31 11:29:59 +09:30
run-cryptomsg.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-derive_basepoints.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-features.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-gossmap-fp16.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-gossmap_canned.c test: run-gossmap update test store instructions 2022-07-12 13:59:46 -05:00
run-gossmap_local.c test: run-gossmap update test store instructions 2022-07-12 13:59:46 -05:00
run-ip_port_parsing.c common/wireaddr.h: simplify parse_wireaddr API. 2023-06-01 09:28:39 +09:30
run-json.c cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
run-json_filter.c lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
run-json_remove.c lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
run-json_scan.c common: allow optional fields in json_scan(). 2023-06-03 10:50:29 +09:30
run-json_stream-filter.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-key_derive.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-lease_rates.c tools/gen: Always return bool! 2022-07-14 12:24:48 -05:00
run-onion-message-test.c build: don't generate experimental variants of wire files. 2023-05-23 09:34:08 +09:30
run-onion-test-vector.c build: don't generate experimental variants of wire files. 2023-05-23 09:34:08 +09:30
run-param.c common/json_param: use assert() for param correctness checks. 2023-07-25 14:47:12 +09:30
run-psbt_diff.c Update libwally to 0.8.8, support PSBTv2 2023-03-23 16:10:55 +10:30
run-route-specific.c common/gossip_store: clean up header. 2023-01-30 15:15:41 -06:00
run-route.c common/gossip_store: clean up header. 2023-01-30 15:15:41 -06:00
run-route_blinding_onion_test.c build: don't generate experimental variants of wire files. 2023-05-23 09:34:08 +09:30
run-route_blinding_test.c common: remove old route-blinding-override test, update route-blinding test for new vectors. 2022-10-26 11:29:06 +10:30
run-sphinx-xor_cipher_stream.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-sphinx.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-tlv_span.c bitcoin: add tx_feerate() to reverse-calculate feerate a tx paid. 2023-04-06 09:01:48 +09:30
run-version.c comm: make sure that our version check is reliable 2023-01-17 14:15:24 +10:30
run-wireaddr.c lightningd: allow --bind=ws: 2023-06-01 09:28:39 +09:30