error comes out that "database dirty flag set " when running "$ nodeos"
JiQin-MacBook-Pro:nodeos ye$ nodeos 836674ms thread-0 chain_plugin.cpp:130 plugin_initialize ] initializing chain plugin 836678ms thread-0 main.cpp:112 main ] /Users/ye/eos/libraries/chainbase/src/chainbase.cpp(106): Throw in function chainbase::database::database(const bfs::path &, chainbase::database::open_flags, uint64_t) Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error > std::exception::what: database dirty flag set (likely due to unclean shutdown) replay or resync required
Follow the instruction of log when running "$ nodeos --resync", it works. but the chain was cleaned . accounts were reset. emmmmm.....
This is because nodeos was not stopped normally, for example "kill -9 pid".
Try this: nodeos --replay-blockchain --hard-replay-blockchain
@taokayan what if the instance is crashed? you can't guarantee every time nodeos "stopped normally"
@taokayan Then also above this commands will work.
--hard-replay works even when the instance crashed.
Try this:
nodeos --replay-blockchain --hard-replay-blockchain
Works like a charm.