Skip to content

Commit ef8cb22

Browse files
committed
fixup!
These need to be rebased, but keeping separate for review. 1. uninitialized variables: thanks valgrind! 2. many header malorders.
1 parent 71babfc commit ef8cb22

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

plugins/bkpr/account.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <ccan/json_out/json_out.h>
55
#include <ccan/str/str.h>
66
#include <ccan/tal/str/str.h>
7-
#include <common/coin_mvt.h>
87
#include <common/memleak.h>
98
#include <common/node_id.h>
109
#include <plugins/bkpr/account.h>

plugins/bkpr/blockheights.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
#include <ccan/tal/str/str.h>
88
#include <common/memleak.h>
99
#include <common/utils.h>
10+
#include <inttypes.h>
1011
#include <plugins/bkpr/blockheights.h>
1112
#include <plugins/bkpr/bookkeeper.h>
1213
#include <plugins/libplugin.h>
1314

14-
#include <inttypes.h>
15-
1615
struct blockheight_entry {
1716
struct bitcoin_txid txid;
1817
u32 height;

plugins/bkpr/bookkeeper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ parse_and_log_chain_move(struct command *cmd,
10901090
enum mvt_tag tag, *tags;
10911091

10921092
/* Fields we expect on *every* chain movement */
1093+
closed_count = 0;
10931094
err = json_scan(tmpctx, buf, chainmove,
10941095
"{account_id:%"
10951096
",created_index:%"

plugins/bkpr/channel_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct channel_event *new_channel_event(const tal_t *ctx,
2424
ev->credit = credit;
2525
ev->debit = debit;
2626
ev->fees = fees;
27-
ev->payment_id = tal_dup(ev, struct sha256, payment_id);
27+
ev->payment_id = tal_dup_or_null(ev, struct sha256, payment_id);
2828
ev->part_id = part_id;
2929
ev->timestamp = timestamp;
3030

plugins/bkpr/descriptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#include <ccan/htable/htable_type.h>
55
#include <ccan/json_out/json_out.h>
66
#include <ccan/str/hex/hex.h>
7-
#include <ccan/tal/tal.h>
87
#include <ccan/tal/str/str.h>
8+
#include <ccan/tal/tal.h>
99
#include <common/memleak.h>
1010
#include <common/utils.h>
1111
#include <plugins/bkpr/bookkeeper.h>

plugins/bkpr/onchain_fee.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
#include <common/json_stream.h>
1010
#include <common/memleak.h>
1111
#include <common/pseudorand.h>
12+
#include <inttypes.h>
1213
#include <plugins/bkpr/account.h>
1314
#include <plugins/bkpr/account_entry.h>
1415
#include <plugins/bkpr/chain_event.h>
1516
#include <plugins/bkpr/channel_event.h>
1617
#include <plugins/bkpr/onchain_fee.h>
1718
#include <plugins/bkpr/recorder.h>
1819
#include <plugins/libplugin.h>
19-
#include <inttypes.h>
2020
#include <wire/wire.h>
2121

2222
/* We keep a hash of onchain_fee arrays. Each array is sorted. */

plugins/bkpr/rebalances.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <common/memleak.h>
99
#include <common/node_id.h>
1010
#include <common/utils.h>
11-
#include <plugins/bkpr/rebalances.h>
1211
#include <plugins/bkpr/bookkeeper.h>
12+
#include <plugins/bkpr/rebalances.h>
1313
#include <plugins/libplugin.h>
1414
#include <wire/wire.h>
1515

plugins/bkpr/sql.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "config.h"
2+
13
#include <common/json_stream.h>
24
#include <plugins/bkpr/blockheights.h>
35
#include <plugins/bkpr/chain_event.h>

plugins/bkpr/sql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ PRINTF_FMT(4, 5) chain_events_from_sql(const tal_t *ctx,
6767
/* Return with escaped quotes, if any */
6868
const char *sql_string(const tal_t *ctx, const char *str);
6969

70-
#endif /* LIGHTNING_PLUGINS_BKPR_BOOKKEEPER_H */
70+
#endif /* LIGHTNING_PLUGINS_BKPR_SQL_H */

0 commit comments

Comments
 (0)