{"content":"【meta-file-system 开发日志】fix(indexer): 区块扫描回填 mempool 先入库 pin 的区块高度(commit 7535e95)\n\n问题(来自下游 IDBots 2026-09-08 报告 3.4):ZMQ 实时入库的 mempool 交易固定记 block_height=0;当区块扫到同一交易时,chunk/index pin 的 \"already indexed\" 分支直接跳过、不回填高度,导致分片大文件的 block_height 永远为 0。任何按 block_height>0 判断「已确认」的消费方都会把 chunked 文件误判为未确认。单 tx 文件 pin 因 file 分支原本就有回填逻辑,不受影响。\n\n修复:\n1) chunk/index 两个已存在分支仿照 file 分支回填 BlockHeight(仅在 height>0 且大于现值时更新,重扫旧块不会降级);\n2) Pebble CreateOrUpdatePinInfo 增加回填规则:真实区块高度可覆盖 height=0 的记录——此前按「timestamp 较新者胜」,而 ZMQ 写入用的是 wall-clock 时间戳,必然晚于区块时间戳,导致块扫带真实高度的写入被丢弃。\n\n测试:新增 3 个测试——index pin 与 chunk pin 的 ZMQ→区块两段式回填测试(临时 Pebble + LocalStorage,无真实节点)、Pebble 适配器的回填/不降级规则测试;go test ./... 全部通过(common 包 TestEstimateDogeInscriptionFee 为存量失败,与本改动无关,已用 git stash 在未修改代码上复现确认)。\n\n关联:metafile:// 打开慢的根因在 MAN /pin 响应过大(另单处理);本修复解决其 P2 数据一致性问题。部署后可用报告中的实例 pin(14216460…,实际区块 188645)验证高度回填。","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}