cln/common/test/run-version.c
Rusty Russell 8f8cab0eae bitcoin: hoist script_with_len out of wallet/ into here.
Vital for hashing.  But adding script_with_len_hash here breaks
fuzzing build, so that requires a little modification.

I also noticed that `#include <common/randbytes.h>` is redundant in
all the common/ unit tests, so removed it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-03-23 09:22:04 +10:30

23 lines
578 B
C

#include "config.h"
#include "../version.c"
#include <common/pseudorand.h>
#include <common/setup.h>
#include <assert.h>
#include <stdio.h>
/* AUTOGENERATED MOCKS START */
/* Generated stub for siphash_seed */
const struct siphash_seed *siphash_seed(void)
{ fprintf(stderr, "siphash_seed called!\n"); abort(); }
/* AUTOGENERATED MOCKS END */
int main(int argc, char *argv[])
{
common_setup(argv[0]);
assert(cmp_release_version("v22.11"));
assert(cmp_release_version("v22.11.1"));
assert(cmp_release_version("v22.11.1-6-gdf29990-modded") == false);
common_shutdown();
}