You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix two critical stability issues: share verification freeze and header persistence loss
1. Persist verified share status in LevelDB (p2pool known_verified pattern):
- Add is_verified flag to ShareMetadata with backward-compatible serialization
- Pre-populate verified tracker on startup, bypassing expensive re-verification
- Budget think() Phase 2 to 100 shares per call with deferred continuation
- Flush verified hashes in batches of 50 via mark_shares_verified()
2. Switch header chain to write-back persistence (Litecoin Core FlushStateToDisk pattern):
- Replace per-header individual put() with dirty set + atomic WriteBatch
- flush_dirty() writes all dirty headers + tip in single fsync'd batch
- Prevents header loss on crash (was losing 4.6M headers, keeping only ~8000)
- Add BatchWriter::commit_sync() for forced fsync
3. Fix on_tip_changed threading: post callback to ioc instead of executing
on hdr_pool thread, preventing cross-thread access to bcaster/web_server/UTXO
0 commit comments