Skip to content

Commit 22a5e9e

Browse files
committed
common: reintroduce "ignored" primary tag.
Prior to 23.05, we used this tag to mark onchain to-self inputs we didn't wait for (because they were too small). This fixes migration if that happened (and we are debating whether we should re-introduce this!). ``` lightningd: FATAL SIGNAL 6 (version v25.09rc2) 0x100c8683 send_backtrace common/daemon.c:33 0x100c876f crashdump common/daemon.c:78 0x7fffb2080493 ??? ???:0 0x7fffb1ab0cac ??? __pthread_kill_implementation+0x1bc:0 0x7fffb1a48a5b ??? __GI_raise+0x2b:0 0x7fffb1a2a3db ??? __GI_abort+0x153:0 0x100935b7 migrate_from_account_db wallet/account_migration.c:424 0x10093ff7 db_migrate wallet/db.c:1139 0x10096763 db_setup wallet/db.c:1185 0x100a1bcb wallet_new wallet/wallet.c:223 0x1004485f main lightningd/lightningd.c:1311 0x7fffb1a2aba3 ??? __libc_start_call_main+0x93:0 0x7fffb1a2adeb ??? __libc_start_main_alias_1+0x1ab:0 0xffffffffffffffff ??? ???:0 lightningd: Died with signal 6 ``` Signed-off-by: Rusty Russell <[email protected]> Fixes: #8484
1 parent 0493b47 commit 22a5e9e

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed

common/coin_mvt.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static const char *mvt_tags[] = {
3636
"penalty_adj",
3737
"journal_entry",
3838
"foreign",
39+
"ignored",
3940
};
4041

4142
#define PRIMARY_TAG_BITS ((1ULL << MVT_DEPOSIT) | \
@@ -59,7 +60,8 @@ static const char *mvt_tags[] = {
5960
(1ULL << MVT_LEASE_FEE) | \
6061
(1ULL << MVT_PENALTY_ADJ) | \
6162
(1ULL << MVT_JOURNAL) | \
62-
(1ULL << MVT_CHANNEL_PROPOSED))
63+
(1ULL << MVT_CHANNEL_PROPOSED) | \
64+
(1ULL << MVT_IGNORED))
6365

6466
static enum mvt_tag mvt_tag_in_db(enum mvt_tag mvt_tag)
6567
{
@@ -145,6 +147,9 @@ static enum mvt_tag mvt_tag_in_db(enum mvt_tag mvt_tag)
145147
case MVT_FOREIGN:
146148
BUILD_ASSERT(MVT_FOREIGN == 26);
147149
return mvt_tag;
150+
case MVT_IGNORED:
151+
BUILD_ASSERT(MVT_IGNORED == 27);
152+
return mvt_tag;
148153
}
149154
abort();
150155
}

common/coin_mvt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ enum mvt_tag {
4040
MVT_PENALTY_ADJ = 24,
4141
MVT_JOURNAL = 25,
4242
MVT_FOREIGN = 26,
43-
#define NUM_MVT_TAGS (MVT_FOREIGN + 1)
43+
MVT_IGNORED = 27,
44+
#define NUM_MVT_TAGS (MVT_IGNORED + 1)
4445
};
4546

4647
struct mvt_tags {

common/test/run-coin_mvt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ static bool mvt_tag_is_primary(enum mvt_tag tag)
186186
return true;
187187
case MVT_FOREIGN:
188188
return false;
189+
case MVT_IGNORED:
190+
return true;
189191
}
190192
abort();
191193
}

contrib/msggen/msggen/schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16666,6 +16666,7 @@
1666616666
"to_them",
1666716667
"penalized",
1666816668
"stolen",
16669+
"ignored",
1666916670
"to_miner"
1667016671
],
1667116672
"description": [

doc/schemas/listchainmoves.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
"to_them",
115115
"penalized",
116116
"stolen",
117+
"ignored",
117118
"to_miner"
118119
],
119120
"description": [

plugins/bkpr/account.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ void maybe_update_account(struct command *cmd,
218218
case MVT_PENALTY_ADJ:
219219
case MVT_JOURNAL:
220220
case MVT_FOREIGN:
221+
case MVT_IGNORED:
221222
/* Ignored */
222223
break;
223224
}

0 commit comments

Comments
 (0)