Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Database migration broken during migration to master

未关闭
#9,608 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@vincenzopalazzo 已经在做这个了。

开始于 2026年10月8日。

  • #9613 来自 @vincenzopalazzo —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
57/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c, sqlite
领域
database

调研方向

Start by reading wallet/migrations.c around line 69 and trace the migration from database version 284 to 288, especially when the our_outputs table is created relative to this insert. Reproduce the reported upgrade from 26.06.8 to master and inspect the migration tests for that path. Done when the upgrade completes without the missing-table error.

由索引模型根据 Issue 内容生成。

描述

Running commit 019a5e190. When migrating from 26.06.8 to master:

2026-10-07T20:30:15.567Z INFO lightningd: Updating database from version 284 to 288
2026-10-07T20:30:15.567Z BROKEN lightningd: Error executing statement: wallet/migrations.c:69: INSERT OR IGNORE INTO our_outputs (txid, outnum, blockheight, txindex, scriptpubkey, satoshis, spendheight, reserved_til, keyindex, channel_dbid, peer_id, commitment_point, option_anchors, csv) SELECT prev_out_tx, prev_out_index, COALESCE(confirmation_height, 0), CASE WHEN confirmation_height IS NULL THEN 0 WHEN is_in_coinbase = 1 THEN 0 ELSE 1 END, scriptpubkey, value, spend_height, COALESCE(reserved_til, 0), CASE WHEN channel_id IS NULL THEN keyindex ELSE NULL END, channel_id, peer_id, commitment_point, option_anchor_outputs, csv_lock FROM outputs WHERE scriptpubkey IS NOT NULL;: no such table: our_outputs

主要语言
C
星标
3.1k
派生
1k
平均合并
4 天 2 小时
30 天内合并 PR
45

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ElementsProject/lightning 的其他 Issue

查看 ElementsProject/lightning 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。