cleos get currency balance killed my nodeos
When I ran the command:
cleos --wallet-host localhost --wallet-port 8000 get currency balance token steve, it seemed to kill my nodeos and outputted the error:
ption: Assert Exception
head_block_num() == 0: last block ID does not match current chain state
{"last_block->id":"00001a31a8f35505c2c5d8c65dc5a019b6ce2827ec4be89694ac3b628a6a8da5","head_block_num":6706}
thread-0 chain_controller.cpp:1812 _spinup_fork_db
rethrow
{"my->genesis_file.generic_string()":"/Users/s180256/Library/Application Support/eosio/nodeos/config/genesis.json"}
thread-0 chain_plugin.cpp:217 plugin_startup
I ran nodeos --resync to fix my blockchain, but is there another solution to this without having to reset my blockchain?
If your node is successfully advancing the last irreversible block, you can try --replay instead of --resync. That will use the block log to rebuild the in-memory database.