From fc30b68c40c62d2e0256e52f0a9fd6e5c43ec2c1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 17 Aug 2024 14:57:12 +0930 Subject: [PATCH] nostrdb: Makefile: build using ccan/ versions of files. Signed-off-by: Rusty Russell Signed-off-by: William Casarin --- nostrdb/src/bolt11/amount.c | 6 +++--- nostrdb/src/bolt11/amount.h | 4 ++-- nostrdb/src/bolt11/bech32_util.h | 2 +- nostrdb/src/bolt11/bolt11.c | 16 ++++++++-------- nostrdb/src/bolt11/bolt11.h | 4 ++-- nostrdb/src/bolt11/hash_u5.c | 3 ++- nostrdb/src/bolt11/hash_u5.h | 4 ++-- nostrdb/src/bolt11/node_id.h | 4 ++-- nostrdb/src/bolt11/overflows.h | 2 +- nostrdb/src/nostrdb.c | 2 +- 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/nostrdb/src/bolt11/amount.c b/nostrdb/src/bolt11/amount.c index a0f9ef57..a7584ad7 100644 --- a/nostrdb/src/bolt11/amount.c +++ b/nostrdb/src/bolt11/amount.c @@ -1,9 +1,9 @@ #include "../config.h" -#include -#include "mem.h" -#include "talstr.h" +#include "ccan/mem/mem.h" +#include "ccan/tal/str/str.h" #include "amount.h" #include "overflows.h" +#include #include bool amount_sat_to_msat(struct amount_msat *msat, diff --git a/nostrdb/src/bolt11/amount.h b/nostrdb/src/bolt11/amount.h index 4e6c11ed..db8e5402 100644 --- a/nostrdb/src/bolt11/amount.h +++ b/nostrdb/src/bolt11/amount.h @@ -1,8 +1,8 @@ #ifndef LIGHTNING_COMMON_AMOUNT_H #define LIGHTNING_COMMON_AMOUNT_H #include "../config.h" -#include "short_types.h" -#include "tal.h" +#include "ccan/short_types/short_types.h" +#include "ccan/tal/tal.h" #define MSAT_PER_SAT ((u64)1000) #define SAT_PER_BTC ((u64)100000000) diff --git a/nostrdb/src/bolt11/bech32_util.h b/nostrdb/src/bolt11/bech32_util.h index 20031ebc..3d5ce313 100644 --- a/nostrdb/src/bolt11/bech32_util.h +++ b/nostrdb/src/bolt11/bech32_util.h @@ -2,7 +2,7 @@ #define LIGHTNING_COMMON_BECH32_UTIL_H #include "../config.h" -#include "tal.h" +#include "ccan/tal/tal.h" #include "hash_u5.h" /** diff --git a/nostrdb/src/bolt11/bolt11.c b/nostrdb/src/bolt11/bolt11.c index c22a9215..397f1ca7 100644 --- a/nostrdb/src/bolt11/bolt11.c +++ b/nostrdb/src/bolt11/bolt11.c @@ -10,18 +10,18 @@ //#include "address.h" //#include "script.h" #include "bech32.h" -#include "utf8.h" -#include "../compiler.h" -#include "../endian.h" -#include "list.h" -#include "talstr.h" -#include "tal.h" +#include "ccan/utf8/utf8.h" +#include "ccan/compiler//compiler.h" +#include "ccan/endian/endian.h" +#include "ccan/list/list.h" +#include "ccan/tal/str/str.h" +#include "ccan/tal/tal.h" #include "node_id.h" #include "bech32_util.h" #include "bolt11.h" #include "amount.h" -#include "array_size.h" -#include "structeq.h" +#include "ccan/array_size/array_size.h" +#include "ccan/structeq/structeq.h" //#include "features.h" #include diff --git a/nostrdb/src/bolt11/bolt11.h b/nostrdb/src/bolt11/bolt11.h index aabbb8a5..4f0de259 100644 --- a/nostrdb/src/bolt11/bolt11.h +++ b/nostrdb/src/bolt11/bolt11.h @@ -1,10 +1,10 @@ #ifndef LIGHTNING_COMMON_BOLT11_H #define LIGHTNING_COMMON_BOLT11_H -#include "short_types.h" +#include "ccan/short_types/short_types.h" #include "hash_u5.h" #include "amount.h" -#include "list.h" +#include "ccan/list/list.h" #include "amount.h" #include "node_id.h" //#include diff --git a/nostrdb/src/bolt11/hash_u5.c b/nostrdb/src/bolt11/hash_u5.c index 737ec03f..04cb5fce 100644 --- a/nostrdb/src/bolt11/hash_u5.c +++ b/nostrdb/src/bolt11/hash_u5.c @@ -1,5 +1,6 @@ #include "../config.h" -#include "../endian.h" +#include "ccan/endian/endian.h" +#include "ccan/short_types/short_types.h" #include "hash_u5.h" #include diff --git a/nostrdb/src/bolt11/hash_u5.h b/nostrdb/src/bolt11/hash_u5.h index 69f4b6f7..8d4debec 100644 --- a/nostrdb/src/bolt11/hash_u5.h +++ b/nostrdb/src/bolt11/hash_u5.h @@ -1,8 +1,8 @@ /* bech32 (thus bolt11) deal in 5-bit values */ #ifndef LIGHTNING_COMMON_HASH_U5_H #define LIGHTNING_COMMON_HASH_U5_H -#include "../sha256.h" -#include "short_types.h" +#include "ccan/crypto/sha256/sha256.h" +#include "ccan/short_types/short_types.h" /* Type to annotate a 5 bit value. */ typedef unsigned char u5; diff --git a/nostrdb/src/bolt11/node_id.h b/nostrdb/src/bolt11/node_id.h index 873e10b1..00d798d6 100644 --- a/nostrdb/src/bolt11/node_id.h +++ b/nostrdb/src/bolt11/node_id.h @@ -2,8 +2,8 @@ #ifndef LIGHTNING_COMMON_NODE_ID_H #define LIGHTNING_COMMON_NODE_ID_H #include "../config.h" -#include "short_types.h" -#include "tal.h" +#include "ccan/short_types/short_types.h" +#include "ccan/tal/tal.h" struct node_id { u8 k[33]; diff --git a/nostrdb/src/bolt11/overflows.h b/nostrdb/src/bolt11/overflows.h index dac460c0..129b618f 100644 --- a/nostrdb/src/bolt11/overflows.h +++ b/nostrdb/src/bolt11/overflows.h @@ -1,7 +1,7 @@ #ifndef LIGHTNING_COMMON_OVERFLOWS_H #define LIGHTNING_COMMON_OVERFLOWS_H #include "../config.h" -#include "short_types.h" +#include "ccan/short_types/short_types.h" static inline bool add_overflows_size_t(uint64_t a, uint64_t b) { diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c index 705b5b02..89b383e7 100644 --- a/nostrdb/src/nostrdb.c +++ b/nostrdb/src/nostrdb.c @@ -4,7 +4,7 @@ #include "hex.h" #include "cursor.h" #include "random.h" -#include "sha256.h" +#include "ccan/crypto/sha256/sha256.h" #include "bolt11/bolt11.h" #include "bolt11/amount.h" #include "lmdb.h"