Node shutdown after restart
Steps to reproduce:
- Run node using ./run.sh
- Wait until the entire blockchain syncs.
- Ctrl + C to shutdown, the node shuts down with a message at the end "Migretor server 1.11.14 stopped."
- Restart the node again using command ./run.sh, the node immediately shuts down with following exception:
2018-12-03 08:09:50 INFO: Database update may take a while if needed, current db version 92...
2018-12-03 08:09:50 SEVERE: Blockchain database inconsistent with code, at update 93, probably trying to run older code on newer database
java.lang.RuntimeException: Blockchain database inconsistent with code, at update 93, probably trying to run older code on newer database
at nxt.NxtDbVersion.update(NxtDbVersion.java:328)
at nxt.db.DbVersion.init(DbVersion.java:55)
at nxt.db.BasicDb.init(BasicDb.java:149)
at nxt.Db.init(Db.java:40)
at nxt.Nxt$Init.<clinit>(Nxt.java:357)
at nxt.Nxt.init(Nxt.java:327)
at nxt.Nxt.main(Nxt.java:314)
2018-12-03 08:09:50 INFO: Shutting down...
Ideally, it should run without issue when restarted. The current workaround is removing/deleting local directory 'nxt_db' where DB exists and restarting the node where it resyncs the DB from beginning.