Database

重新同步 bcoin 會導致數據庫版本錯誤

  • August 9, 2017

我正在重新同步我的 bcoin 節點並收到以下錯誤:

Error: Warning: Your database does not match the current database version. 
This is likely because the database layout or serialization format has changed drastically. 
If you want to dump your data, downgrade to your previous version first. 
If you do not think you should be seeing this error, post an issue on the repo.
  at LowlevelUp.checkVersion (/root/bcoin/lib/db/lowlevelup.js:603:11)
  at <anonymous>

如果您正在執行 master,則最近的遷移會導致此問題。

你可以執行它來修復它: node migrate/chaindb2to3.js /path/to/chaindb.ldb

這將花費很長時間,但如果您不介意同時修剪數據庫,您可以執行它,它會更快: node migrate/chaindb2to3.js /path/to/chaindb.ldb --prune

如果這不起作用,您可以隨時重置數據庫並重新同步。只需從 ~/.bcoin 目錄中刪除所有 .ldb 文件並重新啟動 bcoin。

引用自:https://bitcoin.stackexchange.com/questions/57547