Files
palladum-lightning/tests/fuzz/fuzz-addr.c
Davide Grilli 37cc8b9cf9
Some checks failed
Coverage (Nightly) / Build with Coverage (push) Has been cancelled
Coverage (Nightly) / Test (postgres) (push) Has been cancelled
Coverage (Nightly) / Test (sqlite) (push) Has been cancelled
Coverage (Nightly) / Generate Coverage Report (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: focal (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: jammy (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: noble (push) Has been cancelled
Python API Docs (Nightly) / Generate Python API Documentation (push) Has been cancelled
Documentation (Nightly) / Generate Project Documentation (push) Has been cancelled
Publish Documentation Site / Generate Coverage Reports (push) Has been cancelled
Publish Documentation Site / Generate Python API Documentation (push) Has been cancelled
Publish Documentation Site / Generate Project Documentation (push) Has been cancelled
Publish Documentation Site / Deploy to GitHub Pages (push) Has been cancelled
feat: Update network references from bitcoin to palladium and add palladiumd RPC warmup retry logic.
2026-02-20 16:15:16 +01:00

30 lines
774 B
C

#include "config.h"
#include <assert.h>
#include <common/addr.h>
#include <common/setup.h>
#include <common/utils.h>
#include <tests/fuzz/libfuzz.h>
void init(int *argc, char ***argv)
{
chainparams = chainparams_for_network("palladium");
/* Don't call this if we're in unit-test mode, as libfuzz.c does it */
if (!tmpctx)
common_setup("fuzzer");
}
void run(const uint8_t *data, size_t size)
{
uint8_t *script_pubkey = tal_dup_arr(tmpctx, uint8_t, data, size, 0);
char *addr = encode_scriptpubkey_to_addr(tmpctx, chainparams, script_pubkey);
if (addr) {
uint8_t *decoded_script_pubkey;
assert(decode_scriptpubkey_from_addr(tmpctx, chainparams, addr, &decoded_script_pubkey));
assert(tal_arr_eq(script_pubkey, decoded_script_pubkey));
}
clean_tmpctx();
}