commit fc30b68c40c62d2e0256e52f0a9fd6e5c43ec2c1
parent 0ac25b7aa3e32f44db3efb6e3b10d799198135d2
Author: Rusty Russell <rusty@rustcorp.com.au>
Date: Sat, 17 Aug 2024 14:57:12 +0930
nostrdb: Makefile: build using ccan/ versions of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
10 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/nostrdb/src/bolt11/amount.c b/nostrdb/src/bolt11/amount.c
@@ -1,9 +1,9 @@
#include "../config.h"
-#include <assert.h>
-#include "mem.h"
-#include "talstr.h"
+#include "ccan/mem/mem.h"
+#include "ccan/tal/str/str.h"
#include "amount.h"
#include "overflows.h"
+#include <assert.h>
#include <inttypes.h>
bool amount_sat_to_msat(struct amount_msat *msat,
diff --git 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
@@ -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
@@ -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 <errno.h>
diff --git 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 <secp256k1_recovery.h>
diff --git 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 <string.h>
diff --git 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
@@ -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
@@ -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
@@ -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"